Historical question about type of Data.List.group

Lennart Augustsson lennart at augustsson.net
Sat Aug 30 07:38:39 EDT 2008


The current type is easier to use in general.
And it was also what I needed back in the days when I added the
function to the LML libraries.

  -- Lennart

On Tue, Aug 26, 2008 at 8:45 PM, Jim Apple
<jbapple+haskell-lib at gmail.com> wrote:
> Why isn't the type of group
>
> Eq a => [a] -> [(a,[a])]
>
> That matches more exactly what group does, and it's easy to see that
> functions like
>
> nubOrd = map fst . group . sort
>
> are clearly safe, whereas
>
> map head . group . sort
>
> is not.
>
> Jim
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>


More information about the Libraries mailing list