[Haskell-cafe] Newb question about map and a list of lists
Jules Bean
jules at jellybean.co.uk
Fri Sep 28 16:47:04 EDT 2007
Chuk Goodin wrote:
> I have a list of lists of pairs of numeric Strings (like this:
> [["2","3"],["1","2"],["13","14"]] etc.) I'd like to change it into a
> list of a list of numbers, but I'm not sure how to go about it. If it
> was just one list, I could use map, but map.map doesn't seem to work.
> Any suggestions, or pointers to a reference online?
Your instinct to use map.map is correct.
Just be careful to write:
(map.map) read l
or
map.map $ read l
beware that:
map.map read l
is parsed as map.(map read l)...
Jules
More information about the Haskell-Cafe
mailing list