public class PartialApplication
extends java.lang.Object
Constructor and Description |
---|
PartialApplication() |
Modifier and Type | Method and Description |
---|---|
static <A,B,R> java.util.function.Function<B,R> |
bindParameter(java.util.function.BiFunction<A,B,R> f,
A a)
It partially applies function A.
|
public static <A,B,R> java.util.function.Function<B,R> bindParameter(java.util.function.BiFunction<A,B,R> f, A a)
a
.
Here you can see an example:
{@code BiFunction<Int, Int, Int> adder = (x, y) -> x + y; Function<Int, Int> add5 = bindParameter(adder, 5); add5(1); }
f
- the function to partially applya
- the first parameter to partially apply