DA.Traversable
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 inPrelude. Ie.:
Module Snapshot
Lifecycle
Stable.
Notices
Status:
active
Introduced in: 3.4.9
Removed in: -
Warnings: 0
Deprecations: 0
Deprecated since: -Typeclasses
class (Functor t, Foldable t) => Traversable t
Functors representing data structures that can be traversed from left to right.
Methods:
mapA:Applicativef=> (a->fb) ->ta->f(tb) Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.sequence:Applicativef=>t(fa) ->f(ta) Evaluate each action in the structure from left to right, and collect the results.
- instance
Ordk=>Traversable(Mapk) - instance
TraversableTextMap - instance
TraversableOptional - instance
TraversableNonEmpty - instance
Traversable(Validationerr) - instance
Traversable(Eithera) - instance
Traversable[] - instance
Traversablea
Functions
forA
forA : (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b)
forA is mapA with its arguments flipped.