I\'ve got a list of strings, is it possible to convert it to an list of ints? E.g.:
[\"1\",\"2\"] -> [1,2]
This fails:
map read ["1","2"] [*Exception: Prelude.read: no parse
The way to do it is :
map (read::String->Int) ["1","2"] [1,2] :: [Int]
Outside of GHCI, in a .hs file it would be:
let intList = map (read::String->Int) ["1","2"]