2 Matching Annotations
- Oct 2014
foldMap :: Monoid m -> (a -> m) -> t a -> m
I'm not sure, but I think what he meant here was
foldMap :: Monoid m => (a -> m) -> t a -> m.
The notion behind it was that one could decompose, e.g., Applicative into an instance of the Pointed typeclass and an instance of the Apply typeclass (giving apply :: f (a -> b) -> f a -> f b) and an instance of Pointed, such that the two interact properly.
There's more on
Functor) here, in case you're unfamiliar with it.