Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you call 'next' on an IO stream, you always get the same answer, an IO effect which, when executed, would destructively get the next item:

  next :: Stream a -> IO a
The function part is pure. The `execution` of the resulting `IO a` action (which is completely separate from its pure evaluation) is not.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: