<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Good day All,<div><br></div><div>Why does</div><div><br></div><div><span style="font-family: Menlo; font-size: 11px;"> liftM (take 5) $ sequence $ repeat getLine</span></div><div><br></div><div>not stop at reading only 5 lines from stdin but keeps on reading more?</div><div><br></div><div>What I’m really trying to achieve is to get input from the user until</div><div>an empty line is read with the code below. But this doesn’t work </div><div>as I expected, similar to the above.</div><div><br></div><div><span style="font-size: 11px; font-family: Menlo;"> liftM (takeWhile (/= "")) $ sequence $ repeat getLine</span></div><div><span style="font-family: Menlo; font-size: 11px;"><br></span></div><div><br></div><div>Regards,<div>Nicolaas du Preez</div></div></body></html>