[Haskell-cafe] Length of lists within list of lists?
aditya.siram at gmail.com
Sat Apr 10 13:07:10 EDT 2010
You need a method that will find the length of a list:
length :: [a] -> Int
and a method that will applies a function to every element of a list
and make a list of the results:
map :: (a ->b) -> [a] -> [b]
Try and put them together.
On 4/10/10, boblettoj <boblettoj99 at msn.com> 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?
> View this message in context:
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe