
26 Feb
2012
26 Feb
'12
1:05 p.m.
Hello Haskellers, Is there really no way to read input word-by-word? E.g., if user types 1 2 3 4 5 function (let's call it getWord :: IO String) should first return "1", then "2", and so on. The main idea behind that is if user entered more values then required, they won't be lost but instead consumed by subsequent reads (calls to getWord). That's how scanf() in C and 'cin >>' in C++ behave, and I'm quite surprised that I can't do that in Haskell. -- Regards, Alexander Batischev 4096R/0C8BFD03 CE6C 4307 9348 58E3 FD94 A00F 3569 61A2 0C8B FD03