4 ms·
> 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
by codygman 11y ago
> 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 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/baastad.pdf http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/ba...