[Haskell-beginners] Better Code

Jeffrey Brown jeffbrown.the at gmail.com
Sat Jan 14 01:14:54 UTC 2017


You could zip the original list to its own tail.


On Fri, Jan 13, 2017 at 4:09 PM, Graham Gill <math.simplex at 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 at 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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20170113/62945733/attachment.html>


More information about the Beginners mailing list