main = interact (unlines . lines)<div><br></div><div>This *appears* to somewhat reliably get me functionality that looks like take a line of input, and print it out.</div><div><br></div><div>Is this behavior something I can rely on working?</div>
<div><br></div><div>I like the idea that lines can pull lines lazily from &quot;getContents&quot; which lazily consume the input.  But I&#39;m concerned that relying on a pure function like &quot;unlines . lines&quot; to sequence IO is a bit too implicit in nature.</div>
<div><br></div><div>I really like the idea of doing things through functions like Interact in that they appear to allow me to keep most of my code pure, but if I can&#39;t get the IO sequencing I want to be guaranteed to work, I suppose I&#39;ll have to dive back into &quot;imperative IO&quot; land that I get from the IO Monad.</div>
<div><br></div><div>Should I feel guilty for doing so?  :-) </div><div><br></div><div>Dave</div>