com.jnape.palatable.lambda.functions.builtin.fn2

## Class Sequence<A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn2.Sequence<A,App,Trav,TravA,AppTrav>

- Type Parameters:
    `A` - the Traversable element type
    `App` - the Applicative unification parameter
    `Trav` - the Traversable unification parameter
    `TravA` - the Traversable instance wrapped in the output Applicative
    `AppTrav` - the concrete parametrized output Applicative type
  All Implemented Interfaces:
    Fn1<Traversable<? extends Applicative<A,App>,Trav>,Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>>, Fn2<Traversable<? extends Applicative<A,App>,Trav>,Fn1<TravA,? extends AppTrav>,AppTrav>, Applicative<Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<Traversable<? extends Applicative<A,App>,Trav>,?>>, Cartesian<Traversable<? extends Applicative<A,App>,Trav>,Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<?,?>>, Cocartesian<Traversable<? extends Applicative<A,App>,Trav>,Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<?,?>>, Contravariant<Traversable<? extends Applicative<A,App>,Trav>,Profunctor<?,Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<?,?>>>, Functor<Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<Traversable<? extends Applicative<A,App>,Trav>,?>>, Profunctor<Traversable<? extends Applicative<A,App>,Trav>,Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<?,?>>, Monad<Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<Traversable<? extends Applicative<A,App>,Trav>,?>>, MonadReader<Traversable<? extends Applicative<A,App>,Trav>,Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<Traversable<? extends Applicative<A,App>,Trav>,?>>, MonadRec<Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<Traversable<? extends Applicative<A,App>,Trav>,?>>, MonadWriter<Traversable<? extends Applicative<A,App>,Trav>,Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>,Fn1<Traversable<? extends Applicative<A,App>,Trav>,?>>

      public final class Sequence<A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>>
      extends Object
      implements Fn2<Traversable<? extends Applicative<A,App>,Trav>,Fn1<TravA,? extends AppTrav>,AppTrav>

  Given a `Traversable` of `Applicative`s and a pure `Applicative` constructor, traverse the elements from left to right, zipping the `Applicative`s together and collecting the results. If the `Traversable` is empty, simply wrap it in the `Applicative` by calling `pure`.

  Modulo any type-level coercion, this is equivalent to `traversable.traverse(id(), pure)`.

  Note that specialized overloads exist for certain built-in JDK types that would otherwise be instances `Traversable` if it weren't for the extensibility problem.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AppTrav` | `checkedApply(Traversable<? extends Applicative<A,App>,Trav> traversable, Fn1<TravA,? extends AppTrav> pure)`
    `static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>> Sequence<A,App,Trav,TravA,AppTrav>` | `sequence()`
    `static <A,App extends Applicative<?,App>,AppIterable extends Applicative<Iterable<A>,App>> Fn1<Fn1<Iterable<A>,? extends AppIterable>,AppIterable>` | `sequence(Iterable<? extends Applicative<A,App>> iterableApp)`
    `static <A,App extends Applicative<?,App>,AppIterable extends Applicative<Iterable<A>,App>> AppIterable` | `sequence(Iterable<? extends Applicative<A,App>> iterableApp, Fn1<Iterable<A>,? extends AppIterable> pure)`
    `static <A,B,App extends Applicative<?,App>,AppMap extends Applicative<Map<A,B>,App>> Fn1<Fn1<Map<A,B>,? extends AppMap>,AppMap>` | `sequence(Map<A,? extends Applicative<B,App>> mapApp)`
    `static <A,B,App extends Applicative<?,App>,AppMap extends Applicative<Map<A,B>,App>> AppMap` | `sequence(Map<A,? extends Applicative<B,App>> mapApp, Fn1<Map<A,B>,? extends AppMap> pure)`
    `static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>> Fn1<Fn1<TravA,? extends AppTrav>,AppTrav>` | `sequence(Traversable<? extends Applicative<A,App>,Trav> traversable)`
    `static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>> AppTrav` | `sequence(Traversable<? extends Applicative<A,App>,Trav> traversable, Fn1<TravA,? extends AppTrav> pure)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2

      `apply, apply, checkedApply, compose, contraMap, curried, curry, diMapL, discardR, flip, fn2, fromBiFunction, toBiFunction, uncurry, widen`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1

      `andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, zip, zip`

    - ### Methods inherited from interface com.jnape.palatable.lambda.monad.Monad

      `join`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functor.Functor

      `coerce`

- - ### Method Detail

    - #### checkedApply

          public AppTrav checkedApply(Traversable<? extends Applicative<A,App>,Trav> traversable,
                                      Fn1<TravA,? extends AppTrav> pure)

      Specified by:
        `checkedApply` in interface `Fn2<Traversable<? extends Applicative<A,App extends Applicative<?,App>>,Trav extends Traversable<?,Trav>>,Fn1<TravA extends Traversable<A,Trav>,? extends AppTrav extends Applicative<TravA,App>>,AppTrav extends Applicative<TravA,App>>`

    - #### sequence

          public static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>> Sequence<A,App,Trav,TravA,AppTrav> sequence()

    - #### sequence

          public static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>> Fn1<Fn1<TravA,? extends AppTrav>,AppTrav> sequence(Traversable<? extends Applicative<A,App>,Trav> traversable)

    - #### sequence

          public static <A,App extends Applicative<?,App>,Trav extends Traversable<?,Trav>,TravA extends Traversable<A,Trav>,AppTrav extends Applicative<TravA,App>> AppTrav sequence(Traversable<? extends Applicative<A,App>,Trav> traversable,
                                                                                                                                                                                      Fn1<TravA,? extends AppTrav> pure)

    - #### sequence

          public static <A,App extends Applicative<?,App>,AppIterable extends Applicative<Iterable<A>,App>> Fn1<Fn1<Iterable<A>,? extends AppIterable>,AppIterable> sequence(Iterable<? extends Applicative<A,App>> iterableApp)

    - #### sequence

          public static <A,App extends Applicative<?,App>,AppIterable extends Applicative<Iterable<A>,App>> AppIterable sequence(Iterable<? extends Applicative<A,App>> iterableApp,
                                                                                                                                 Fn1<Iterable<A>,? extends AppIterable> pure)

    - #### sequence

          public static <A,B,App extends Applicative<?,App>,AppMap extends Applicative<Map<A,B>,App>> Fn1<Fn1<Map<A,B>,? extends AppMap>,AppMap> sequence(Map<A,? extends Applicative<B,App>> mapApp)

    - #### sequence

          public static <A,B,App extends Applicative<?,App>,AppMap extends Applicative<Map<A,B>,App>> AppMap sequence(Map<A,? extends Applicative<B,App>> mapApp,
                                                                                                                      Fn1<Map<A,B>,? extends AppMap> pure)