> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-generated-reference-full-stack-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DA.Traversable

> Reference documentation for Daml module DA.Traversable.

<div class="x2mdx-ref-page x2mdx-ref-page--collection" />

<span id="module-da-traversable-75075" />

<div class="x2mdx-ref-hero">
  <p class="x2mdx-ref-eyebrow">Daml module</p>

  <h1 class="x2mdx-ref-title">DA.Traversable</h1>

  <p class="x2mdx-ref-summary">Class of data structures that can be traversed from left to right, performing an action on each element.</p>

  <div class="x2mdx-ref-badges">
    <span class="x2mdx-ref-badge x2mdx-ref-badge--protocol">Daml</span>

    <a class="x2mdx-ref-badge x2mdx-ref-badge--added" href="#history-added-3-4-9">Added 3.4.9</a>
  </div>

  <dl class="x2mdx-ref-meta-grid">
    <div class="x2mdx-ref-meta-item">
      <dt>Module</dt>
      <dd>DA.Traversable</dd>
    </div>

    <div class="x2mdx-ref-meta-item">
      <dt>Latest release</dt>
      <dd>3.5.7</dd>
    </div>
  </dl>
</div>

## Typeclasses

<span id="class-da-traversable-traversable-18144" />

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

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

Methods:

* `mapA` : [`Applicative`](/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`](/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`](/appdev/reference/daml-standard-library/prelude#class-ghc-classes-ord-6395) `k` => [`Traversable`](#class-da-traversable-traversable-18144) ([`Map`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-map-90052) `k`)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`TextMap`](/appdev/reference/daml-standard-library/prelude#type-da-internal-lf-textmap-11691)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`Optional`](/appdev/reference/daml-standard-library/prelude#type-da-internal-prelude-optional-37153)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`NonEmpty`](/appdev/reference/daml-standard-library/da-nonempty-types#type-da-nonempty-types-nonempty-16010)
* instance [`Traversable`](#class-da-traversable-traversable-18144) ([`Validation`](/appdev/reference/daml-standard-library/da-validation#type-da-validation-types-validation-39644) `err`)
* instance [`Traversable`](#class-da-traversable-traversable-18144) ([`Either`](/appdev/reference/daml-standard-library/prelude#type-da-types-either-56020) `a`)
* instance [`Traversable`](#class-da-traversable-traversable-18144) [`[]`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-x-2599)
* instance [`Traversable`](#class-da-traversable-traversable-18144) `a`

## Functions

<span id="function-da-traversable-fora-19271" />

### `forA`

`forA` : ([`Traversable`](#class-da-traversable-traversable-18144) `t`, [`Applicative`](/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.

## History

<div class="x2mdx-ref-history" aria-label="Reference history">
  <div class="x2mdx-ref-history-event x2mdx-ref-history-event--introduced" id="history-added-3-4-9">
    <div class="x2mdx-ref-history-event-head">
      <span class="x2mdx-ref-history-event-label">Added</span>
      <code class="x2mdx-ref-history-event-version">3.4.9</code>
    </div>
  </div>
</div>
