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

Many IO functions in Haskell use what is known as "lazy I/O", so no, monads are not particularly to do with order of evaluation.

http://book.realworldhaskell.org/read/io.html#io.lazy




Rather, monads are a conceptual structure into which I/O happens to fi t.

https://www.haskell.org/tutorial/


I'm not sure what you're trying to say.


That because IO implies explicit order, Monad as an ADT has been used to explicitly evaluate one expression at a time. It has no "magic" or "special mathematical" properties.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: