
3 Aug
2007
3 Aug
'07
4:38 a.m.
Jules Bean wrote:
do a <- m b <- n l a x b y
becomes
l (<- m) x (<- n) y
...with, I suppose, left-to-right evaluation order. This looks 'almost like substitution' which is the goal.
Having read the thread SPJ pointed to, I should point out that using a mixture of Applicative and Monad notation, this can currently be written as: l <$> m <*> (return x) <*> n =<< (return y) ...where the thing that feels weirdest is having to remember to use =<< instead of <*> for the final 'application'. Jules