News for hackers. Stuff that matters.
Re:Once you go functional, you can never go back by codygman on Wednesday May 20, 2015 @03:38AM (#9574945)
> Ha, just put this code into any old deeply nested function that's not already contaminated with the IO monad.

Why would I want to do that? I could just pass the filepath to that function if it needed it, or if I want it to log messages I could use the writer monad.

> Or try to do something that needs two monads at the same time.

Monad transfomers aren't so hard: http://www.cs.virginia.edu/~wh5a/personal/Transformers.pdf

Edit: One of my favorite papers, I believe multiple monads are used in it: http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/ba...

There are no comments on this comment yet.