[Haskell-cafe] Smarter do notation
Ivan Lazar Miljenovic
ivan.miljenovic at gmail.com
Sun Sep 4 06:24:58 CEST 2011
On 4 September 2011 12:34, Daniel Peebles <pumpkingod at gmail.com> wrote:
> Hi all,
> For example, if I write in a do block:
> x <- action1
> y <- action2
> z <- action3
> return (f x y z)
> that doesn't require any of the context-sensitivty that Monads give you, and
> could be processed a lot more efficiently by a clever Applicative instance
> (a parser, for instance).
What advantage is there in using Applicative rather than Monad for
this? Does it _really_ lead to an efficiency increase?
--
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com
More information about the Haskell-Cafe
mailing list