Data.List.groupBy with non-transitive equality predicate
nominolo at googlemail.com
Wed Aug 29 16:41:58 EDT 2007
On 29 aug 2007, at 22.02, Henning Thielemann wrote:
> the documentation doesn't tell which elements are actually compared it
> seems to assume that the comparison is commutative and transitive.
> this point should be made clearer.
I'd say this should be an implicit requirement for Eq a, just like
Monad a assumes the monad laws (or strongly suggests). But I agree
that could be made clearer.
> Additionally I think that comparing neighbouring elements is a useful
> behaviour and I suggest an according variant of 'groupBy' for
I agree that this could be useful.
More information about the Libraries