definitive-base-1.0: The base modules of the Definitive framework.

Safe HaskellNone

Algebra.Traversable

Synopsis

Documentation

class Functor t => Contravariant t whereSource

Methods

collect :: Functor f => f (t a) -> t (f a)Source

Instances

traverse :: (Applicative f, Traversable t) => (a -> f b) -> t a -> f (t b)Source

foreach :: (Applicative f, Traversable t) => t a -> (a -> f b) -> f (t b)Source

transpose :: (Applicative f, Traversable t) => t (f a) -> f (t a)Source

flip :: (Contravariant c, Functor f) => f (c a) -> c (f a)Source

project :: (Contravariant c, Functor f) => (a -> c b) -> f a -> c (f b)Source

The Contravariant version of traverse

doTimes :: Applicative f => Int -> f a -> f [a]Source

converted :: (Unit f, Unit g, Foldable f, Foldable g, Monoid (f a), Monoid (g b)) => Iso (f a) (f b) (g a) (g b)Source

folded :: (Unit f', Foldable f, Monoid m) => Iso m m' (f m) (f' m')Source