Hacker News new | ask | show | jobs
by icebraining 4353 days ago
I believe the whole fuss of monads is because they allow you to write pure functional programming while still doing I/O and similar things.

http://chris-taylor.github.io/blog/2013/02/09/io-is-not-a-si...

1 comments

Ok, but if we're being picky about things, you can use all the monads you want, but if you read a file and display its output two different times, you may well get completely different results. The contents could have changed, someone may have removed the file, and so on.
Mathematically, you have two different inputs in that case, the environment changed since.