I see java.util.function.BiFunction, so I can do this:
BiFunction f = (x, y) -> { return 0; };
What if
Alternative is, add the below dependency,
io.vavr vavr 0.9.0
Now, you can use Vavr Function, like below upto 8 arguments,
3 arguments:
Function3 f = (a, b, c) -> a + b + c;
5 arguments:
Function5 f = (a, b, c, d, e) -> a + b + c + d + e;