You could zip the original list to its own tail.


On Fri, Jan 13, 2017 at 4:09 PM, Graham Gill <math.simplex@gmail.com> wrote:
Sorry, I mean, "groups together consecutive and equal terms, that occur sequentially". Examples speak louder than general descriptions!

On 13-Jan-2017 6:43 PM, Graham Gill wrote:
Here's one that does what you want, doesn't require the list to be sorted, and groups together consecutive and equal terms:


_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners



--
Jeff Brown | Jeffrey Benjamin Brown
Website   |   Facebook   |   LinkedIn(spammy, so I often miss messages here)   |   Github