com.jnape.palatable.lambda.functions.builtin.fn3

## Class ScanLeft<A,B>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn3.ScanLeft<A,B>

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

      public final class ScanLeft<A,B>
      extends Object
      implements Fn3<Fn2<? super B,? super A,? extends B>,B,Iterable<A>,Iterable<B>>

  Given an `Iterable` of `A`s, a starting value `B`, and a ``Fn2`<B, A, B>`, iteratively accumulate over the `Iterable`, collecting each function application result, finally returning an `Iterable` of all the results. Note that, as the name implies, this function accumulates from left to right, such that `scanLeft(f, 0, asList(1,2,3,4,5))` is evaluated as `0, f(0, 1), f(f(0, 1), 2), f(f(f(0, 1), 2), 3), f(f(f(f(0, 1), 2), 3), 4), f(f(f(f(f(0, 1), 2), 3), 4), 5)`.
  See Also:
    `FoldLeft`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterable<B>` | `checkedApply(Fn2<? super B,? super A,? extends B> fn, B b, Iterable<A> as)`
    `static <A,B> ScanLeft<A,B>` | `scanLeft()`
    `static <A,B> Fn2<B,Iterable<A>,Iterable<B>>` | `scanLeft(Fn2<? super B,? super A,? extends B> fn)`
    `static <A,B> Fn1<Iterable<A>,Iterable<B>>` | `scanLeft(Fn2<? super B,? super A,? extends B> fn, B b)`
    `static <A,B> Iterable<B>` | `scanLeft(Fn2<? super B,? super A,? extends B> fn, B b, 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.Fn3

      `apply, apply, apply, checkedApply, compose, contraMap, diMapL, discardR, flip, fn3, fn3, fn3, uncurry, widen`

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

      `checkedApply, curried, curry, fn2, fromBiFunction, toBiFunction`

    - ### 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<B> checkedApply(Fn2<? super B,? super A,? extends B> fn,
                                          B b,
                                          Iterable<A> as)

      Specified by:
        `checkedApply` in interface `Fn3<Fn2<? super B,? super A,? extends B>,B,Iterable<A>,Iterable<B>>`

    - #### scanLeft

          public static <A,B> ScanLeft<A,B> scanLeft()

    - #### scanLeft

          public static <A,B> Fn2<B,Iterable<A>,Iterable<B>> scanLeft(Fn2<? super B,? super A,? extends B> fn)

    - #### scanLeft

          public static <A,B> Fn1<Iterable<A>,Iterable<B>> scanLeft(Fn2<? super B,? super A,? extends B> fn,
                                                                    B b)

    - #### scanLeft

          public static <A,B> Iterable<B> scanLeft(Fn2<? super B,? super A,? extends B> fn,
                                                   B b,
                                                   Iterable<A> as)