2009/2/7 Cory Knapp
<thestonetable@gmail.com>
<nice explanation on : operator - always useful>
Does that help, or did I miss the point?
Ok, I'll try to be more clear with an example: the following function - which surely can be written in better way - takes a list and a predicate and builds two lists. a list of lists of consecutive elements that satisfy the predicate and a list of separators, i.e. of elements that does not satisfy the predicate.
That is: groups odd [1,3,2,5,9,6] -> [[1,3],[5,9]], [2,6]