Class of data structures that can be traversed from left to right, performing an action on each element.
You typically would want to import this module qualified to avoid clashes with
functions defined in
import DA.Traversable qualified as F
class (Functor t, Foldable t) => Traversable t where
Functors representing data structures that can be traversed from left to right.
: Applicative f => (a -> f b) -> t a -> f (t b)
Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.
: Applicative f => t (f a) -> f (t a)
Evaluate each action in the structure from left to right, and collect the results.
instance Ord k => Traversable (Map k)
instance Traversable TextMap
instance Traversable Optional
instance Traversable NonEmpty
instance Traversable (Either a)
instance Traversable ()
instance Traversable a
: (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
mapAwith its arguments flipped.