I want to build a matrix in a list comprehension. For each row I need to getLine and parse it out.
In short, I want to do something like this.
fun = [ getLine | y <- [0..4]]
If I run this function, instead of trying to getLine from command prompt for each row, I get an error for No Instance for (Show (IO String)) arising from a use of 'print'.
I get the error message, but how do I getLine within a list comprehension?
getLine
within a list comprehension :P - user253751