
15 Sep
2007
15 Sep
'07
6:21 a.m.
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.
do S <- A + B Z <- Q * S
vs
do 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? Dominic.