Why should Applicative be a superclass of Monad?
问题 Given: Applicative m, Monad m => mf :: m (a -> b), ma :: m a it seems to be considered a law that: mf <*> ma === do { f <- mf; a <- ma; return (f a) } or more concisely: (<*>) === ap The documentation for Control.Applicative says that <*> is "sequential application," and that suggests that (<*>) = ap . This means that <*> must evaluate effects sequentially from left to right, for consistency with >>= ... But that feels wrong. McBride and Paterson's original paper seems to imply that the left