
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.
hth,
-deech
On 4/10/10, boblettoj
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
-- View this message in context: http://old.nabble.com/Length-of-lists-within-list-of-lists--tp28203363p28203... Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe