Historical question about type of Data.List.group

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Aug 26 17:07:55 EDT 2008

Jim Apple wrote:
> Why isn't the type of group  ::  Eq a => [a] -> [(a,[a])]

You mean that the actual type    Eq a => [a] -> [[a]]
does not give the information that each element of the result is non-empty.

Perhaps this word "non-empty" could be inserted in the specification:

> The group function takes a list and returns a list of *non-empty* lists 
> such that the concatenation of the result is equal to the argument. [...]

best regards, J.W.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/libraries/attachments/20080826/2d8921b3/signature.bin

More information about the Libraries mailing list