Functor => Pointed => Applicative => Monad

Ross Paterson ross at soi.city.ac.uk
Mon Nov 29 19:36:29 CET 2010


On Mon, Nov 29, 2010 at 12:46:28PM -0500, David Menendez wrote:
> On Mon, Nov 29, 2010 at 11:26 AM, Isaac Dupree
> > Is it useful to have Pointed non-Functors?
> 
> Is Pointed useful at all? The last time this discussion came up, I
> asked for algorithms which were generic over pointed functors (in the
> same way that traverse is generic over applicative functors) and no
> one could think of any.

fromFoldable :: (Foldable f, Pointed g, Monoid (g a)) => f a -> g a
fromFoldable = foldMap pure


More information about the Libraries mailing list