
You could zip the original list to its own tail.
On Fri, Jan 13, 2017 at 4:09 PM, Graham Gill
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 https://msu.edu/~brown202/ | Facebook https://www.facebook.com/mejeff.younotjeff | LinkedIn https://www.linkedin.com/in/jeffreybenjaminbrown(spammy, so I often miss messages here) | Github https://github.com/jeffreybenjaminbrown