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

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to