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

## Class Iterate<A>

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

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

      public final class Iterate<A>
      extends Object
      implements Fn2<Fn1<? super A,? extends A>,A,Iterable<A>>

  Lazily generate an infinite `Iterable` from the successive applications of the function first to the initial seed value, then to the result, and so on; i.e., the result of `iterate(x -> x + 1, 0)` would produce an infinite `Iterable` over the elements `0, 1, 2, 3, ...` and so on.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Iterable<A>` | `checkedApply(Fn1<? super A,? extends A> fn, A seed)`
    `static <A> Iterate<A>` | `iterate()`
    `static <A> Fn1<A,Iterable<A>>` | `iterate(Fn1<? super A,? extends A> fn)`
    `static <A> Iterable<A>` | `iterate(Fn1<? super A,? extends A> fn, A seed)`

    - ### 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(Fn1<? super A,? extends A> fn,
                                          A seed)

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

    - #### iterate

          public static <A> Iterate<A> iterate()

    - #### iterate

          public static <A> Fn1<A,Iterable<A>> iterate(Fn1<? super A,? extends A> fn)

    - #### iterate

          public static <A> Iterable<A> iterate(Fn1<? super A,? extends A> fn,
                                                A seed)