[Haskell-cafe] AMP - how do you motivate this in teaching?
Olaf Klinke
olf at aatal-apotheke.de
Sat Nov 21 13:07:07 UTC 2015
Albert's explanation is the best so far, IMHO.
liftA2 is by far the most useful and reasonable function in Control.Applicative. Realizing that it can be made the definition of Applicative is what made me friends with that typeclass.
As an algebraicist, to me Control.Monad.join is what distinguishes Monad from Applicative, although Albert's explanation is more accessible new programmers. I tend to explain monads by example of container monads mimicking powerset features, and join has a natural interpretation there.
-- Olaf
More information about the Haskell-Cafe
mailing list