[Haskell-beginners] Getting a specified number of lines from stdin

Rein Henrichs rein.henrichs at gmail.com
Fri Mar 11 21:48:40 UTC 2016


That is an unnecessary use of unsafeInterleaveIO. The solution is actually
quite simple:

    getLines n = replicateM n getLine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160311/0bd4be3a/attachment.html>


More information about the Beginners mailing list