
26 Aug
2008
26 Aug
'08
9:07 p.m.
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.