[Haskell-cafe] Length of lists within list of lists?
Alexandru Scvortov
scvalex at gmail.com
Sat Apr 10 15:09:58 EDT 2010
someMethod :: [[a]] -> [Int]
someMethod = map length
There's a list, haskell-beginners better suited for this kind of question.
Alex
On Saturday 10 April 2010 18:02:37 boblettoj wrote:
> Hi i want to know if there is any method i can use to count the number of
> items in each list in a list of lists, eg.
>
> someMethod [[a, b, c], [a], [b, d, e, f]]
> would return [3, 1, 4]
>
> is there anything that can do this?
> thanks
More information about the Haskell-Cafe
mailing list