I\'m getting comfortable with the idea of replacing loops with recursion. I\'m fiddling around with a pet project, and I wanted to test some text input functionality so I w
It doesn't matter that IO is involved. You can read about it in Haskell wiki:
IO inside
Or, for a more in-depth experience with Haskell's IO:
Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell