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

## Class Times<A>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn3.Times<A>

- Type Parameters:
    `A` - the input and output type
  All Implemented Interfaces:
    Fn1<Integer,Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>>, Fn2<Integer,Fn1<? super A,? extends A>,Fn1<A,A>>, Fn3<Integer,Fn1<? super A,? extends A>,A,A>, Applicative<Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<Integer,?>>, Cartesian<Integer,Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<?,?>>, Cocartesian<Integer,Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<?,?>>, Contravariant<Integer,Profunctor<?,Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<?,?>>>, Functor<Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<Integer,?>>, Profunctor<Integer,Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<?,?>>, Monad<Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<Integer,?>>, MonadReader<Integer,Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<Integer,?>>, MonadRec<Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<Integer,?>>, MonadWriter<Integer,Fn1<Fn1<? super A,? extends A>,Fn1<A,A>>,Fn1<Integer,?>>

      public final class Times<A>
      extends Object
      implements Fn3<Integer,Fn1<? super A,? extends A>,A,A>

  Given some number of times `n` to invoke a function `A -> A`, and given an input `A`, iteratively apply the function to the input, and then to the result of the invocation, a total of `n` times, returning the result.

  Example: `times(3, x -> x + 1, 0); // 3`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `A` | `checkedApply(Integer n, Fn1<? super A,? extends A> fn, A a)`
    `static <A> Times<A>` | `times()`
    `static <A> Fn2<Fn1<? super A,? extends A>,A,A>` | `times(Integer n)`
    `static <A> Fn1<A,A>` | `times(Integer n, Fn1<? super A,? extends A> fn)`
    `static <A> A` | `times(Integer n, Fn1<? super A,? extends A> fn, A a)`

    - ### 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 A checkedApply(Integer n,
                                Fn1<? super A,? extends A> fn,
                                A a)

      Specified by:
        `checkedApply` in interface `Fn3<Integer,Fn1<? super A,? extends A>,A,A>`

    - #### times

          public static <A> Times<A> times()

    - #### times

          public static <A> Fn2<Fn1<? super A,? extends A>,A,A> times(Integer n)

    - #### times

          public static <A> Fn1<A,A> times(Integer n,
                                           Fn1<? super A,? extends A> fn)

    - #### times

          public static <A> A times(Integer n,
                                    Fn1<? super A,? extends A> fn,
                                    A a)