[Haskell-cafe] groupBy huh?
wren ng thornton
wren at freegeek.org
Fri Mar 4 06:57:24 CET 2011
On 3/3/11 8:14 PM, Brandon S Allbery KF8NH wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 3/3/11 20:09 , Jacek Generowicz wrote:
>>> 1< 2 ok, same group
>>> 1< 3 dito
>>> 1< 2 dito
>>> Thus you get [[1,2,3,2]]
>>
>> OK, that works, but it seems like a strange choice ...
>
> Stability is often valued in functions like this: the order of elements is
> not altered.
Making it stable and also comparing adjacent elements is entirely doable.
--
Live well,
~wren
More information about the Haskell-Cafe
mailing list