Class $<A,B>
- java.lang.Object
-
- com.jnape.palatable.lambda.functions.builtin.fn2.$<A,B>
-
- All Implemented Interfaces:
Fn1<Fn1<? super A,? extends B>,Fn1<A,B>>
,Fn2<Fn1<? super A,? extends B>,A,B>
,Applicative<Fn1<A,B>,Fn1<Fn1<? super A,? extends B>,?>>
,Cartesian<Fn1<? super A,? extends B>,Fn1<A,B>,Fn1<?,?>>
,Cocartesian<Fn1<? super A,? extends B>,Fn1<A,B>,Fn1<?,?>>
,Contravariant<Fn1<? super A,? extends B>,Profunctor<?,Fn1<A,B>,Fn1<?,?>>>
,Functor<Fn1<A,B>,Fn1<Fn1<? super A,? extends B>,?>>
,Profunctor<Fn1<? super A,? extends B>,Fn1<A,B>,Fn1<?,?>>
,Monad<Fn1<A,B>,Fn1<Fn1<? super A,? extends B>,?>>
,MonadReader<Fn1<? super A,? extends B>,Fn1<A,B>,Fn1<Fn1<? super A,? extends B>,?>>
,MonadRec<Fn1<A,B>,Fn1<Fn1<? super A,? extends B>,?>>
,MonadWriter<Fn1<? super A,? extends B>,Fn1<A,B>,Fn1<Fn1<? super A,? extends B>,?>>
public final class $<A,B> extends java.lang.Object implements Fn2<Fn1<? super A,? extends B>,A,B>
Function application, represented as a higher-orderFn2
that receives anFn1
and its argument, and applies it. Useful for treating application as a combinator, e.g.:List<Fn1<Integer, Integer>> fns = asList(x -> x + 1, x -> x, x -> x - 1); List<Integer> args = asList(0, 1, 2); Iterable<Integer> results = zipWith($(), fns, args); // [1, 1, 1]
-
-
Constructor Summary
Constructors Modifier Constructor Description private
$()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <A,B>
$<A,B>$()
static <A,B>
Fn1<A,B>$(Fn1<? super A,? extends B> fn)
static <A,B>
B$(Fn1<? super A,? extends B> fn, A a)
B
checkedApply(Fn1<? super A,? extends B> 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.Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zip
-
-