module Main where mygetlines :: Int -> [IO [String]]mygetlines 0 = []mygetlines a = (fmap words getLine) : mygetlines (a-1) main :: IO ()main = sequence (mygetlines 5) >>= print
1 2 3 2 3 4 1 2 4 5 3 5 4 6 4
[["1","2","3"],["2","3","4"],["1","2","4"],["5","3","5"],["4","6","4"]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!