<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jun 10, 2015 at 11:15 AM Marcin Mrotek <<a href="mailto:marcin.jan.mrotek@gmail.com">marcin.jan.mrotek@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That's why, this is not a pure function because every time you call it, it may return a different string.<br></blockquote><div><br></div><div>This is a common source of confusion. A value of type IO a for some a is not an impure function because it is not a function. Its <b>evaluation</b> is completely pure and referentially transparent: every time you evaluate `getLine`, you get the same IO String value. The only observable difference is under execution, but <b>we don't expect execution to be pure</b>: we only expect evaluation to be pure.</div></div></div>