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, ?>>
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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.Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zip
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2
checkedApply, toBiFunction