A
- the input and output typepublic final class Times<A> extends Object implements Fn3<Integer,Fn1<? super A,? extends A>,A,A>
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
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, apply, apply, checkedApply, compose, contraMap, diMapL, discardR, flip, fn3, fn3, fn3, uncurry, widen
checkedApply, curried, curry, fn2, fromBiFunction, toBiFunction