
12 Jun
2016
12 Jun
'16
1:46 a.m.
Hi, I am learning about monads, and this question came to mind: is there a way to have a sequence of functions left to right like so: g = return 2 >>= \n -> return (n + 1) >>= \n -> return (n + 3) Either: some kind of generic monad that makes this legal, or some way to do this without monad (i.e., without the "returns"). -- http://justonemoremathproblem.com To protect my privacy, please use PGP encryption. It's free and easy to use! My public key ID is 0x340EA95A (pgp.mit.edu).