Proposal: Add chop function to Data.List

Malcolm Wallace malcolm.wallace at me.com
Mon Dec 13 18:36:51 CET 2010


Surely you mean this signature?

chop :: ([a] -> (b, [a])) -> [a] -> [b]


On 13 Dec 2010, at 17:17, Lennart Augustsson wrote:

> I would like to propose the following function for inclusion in  
> Data.List
>
> chop :: (a -> (b, [a]) -> [a] -> [b]
> chop _ [] = []
> chop f as = b : chop f as'
>  where (b, as') = f as






More information about the Libraries mailing list