Duncan Coutts <[email protected]> writes:

> Yes, grouping is the one where I most often find the need for head or
> partial patterns. The function group produces a list of non-empty lists
> but that is not reflected in the type. On the other hand, actually
> reflecting it in the type would make it more awkward:
>
> group :: Eq a => [a] -> [(a,[a])]

  group :: Eq a => [a] -> [(a,Int)] ?

This is often what I want anyway :-)  Of course, this only works for
sane Eq instances.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to