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

## Class Snoc<A>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn2.Snoc<A>

- Type Parameters:
    `A` - the Iterable element type
  All Implemented Interfaces:
    Fn1<A,Fn1<Iterable<A>,Iterable<A>>>, Fn2<A,Iterable<A>,Iterable<A>>, Applicative<Fn1<Iterable<A>,Iterable<A>>,Fn1<A,?>>, Cartesian<A,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>, Cocartesian<A,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>, Contravariant<A,Profunctor<?,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>>, Functor<Fn1<Iterable<A>,Iterable<A>>,Fn1<A,?>>, Profunctor<A,Fn1<Iterable<A>,Iterable<A>>,Fn1<?,?>>, Monad<Fn1<Iterable<A>,Iterable<A>>,Fn1<A,?>>, MonadReader<A,Fn1<Iterable<A>,Iterable<A>>,Fn1<A,?>>, MonadRec<Fn1<Iterable<A>,Iterable<A>>,Fn1<A,?>>, MonadWriter<A,Fn1<Iterable<A>,Iterable<A>>,Fn1<A,?>>

      public final class Snoc<A>
      extends Object
      implements Fn2<A,Iterable<A>,Iterable<A>>

  Opposite of `Cons`: lazily append an element to the end of the given `Iterable`.

  Note that obtaining both laziness and stack-safety is particularly tricky here, and requires an initial eager deforestation of `O(k)` traversals where `k` is the number of contiguously nested `Snoc`s.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterable<A>` | `checkedApply(A a, Iterable<A> as)`
    `static <A> Snoc<A>` | `snoc()`
    `static <A> Fn1<Iterable<A>,Iterable<A>>` | `snoc(A a)`
    `static <A> Iterable<A>` | `snoc(A a, Iterable<A> as)`

    - ### 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 Iterable<A> checkedApply(A a,
                                          Iterable<A> as)

      Specified by:
        `checkedApply` in interface `Fn2<A,Iterable<A>,Iterable<A>>`

    - #### snoc

          public static <A> Snoc<A> snoc()

    - #### snoc

          public static <A> Fn1<Iterable<A>,Iterable<A>> snoc(A a)

    - #### snoc

          public static <A> Iterable<A> snoc(A a,
                                             Iterable<A> as)