> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# DA.Traversable

> Reference documentation for Daml module DA.Traversable.

Daml module

# DA.Traversable

Class of data structures that can be traversed from left to right, performing an action on each element.

Daml

Module
DA.Traversable

Latest release
3.7.5

## Typeclasses

### `class (Functor t, Foldable t) => Traversable t`

Functors representing data structures that can be traversed from left to right.

Methods:

* `mapA` : [`Applicative`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `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.
* `sequence` : [`Applicative`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `f` => `t` (`f` `a`) -> `f` (`t` `a`)
  Evaluate each action in the structure from left to right, and
  collect the results.

Instances:

* instance [`Ord`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#class-ghc-classes-ord-6395) `k` => [`Traversable`](#class-da-traversable-traversable-18144) ([`Map`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-map-90052) `k`)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`TextMap`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-textmap-11691)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`Optional`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`NonEmpty`](https://docs.canton.network/appdev/reference/daml-standard-library/da-nonempty-types#type-da-nonempty-types-nonempty-16010)
* instance [`Traversable`](#class-da-traversable-traversable-18144) ([`Validation`](https://docs.canton.network/appdev/reference/daml-standard-library/da-validation#type-da-validation-types-validation-39644) `err`)
* instance [`Traversable`](#class-da-traversable-traversable-18144) ([`Either`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-da-types-either-56020) `a`)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`[]`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-x-2599)
* instance [`Traversable`](#class-da-traversable-traversable-18144) `a`

## Functions

### `forA`

`forA` : ([`Traversable`](#class-da-traversable-traversable-18144) `t`, [`Applicative`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#class-da-internal-prelude-applicative-9257) `f`) => `t` `a` -> (`a` -> `f` `b`) -> `f` (`t` `b`)

`forA` is `mapA` with its arguments flipped.
