[Haskell-cafe] Sequencing Operations in a Monad
dominic.steinitz at blueyonder.co.uk
Sat Sep 15 02:21:51 EDT 2007
> If you arrange the types to try to do all the operations inside the IO
> monad you can't chain together more than 1 binary operation. eg.
> S <- A + B
> Z <- Q * S
> S <- Q * (A + B)
> Are there any suggestions for this dilemma? Am I using the wrong monad for
> this task?
I'm not sure if this is what you are asking but isn't liftM2 or some
variant what you need?
More information about the Haskell-Cafe