In Java, is it possible to have a lambda accept multiple different types?
I.e: Single variable works:
Function adder = i
You could also use jOOL library - https://github.com/jOOQ/jOOL
It has already prepared function interfaces with different number of parameters. For instance, you could use org.jooq.lambda.function.Function3, etc from Function0 up to Function16.
org.jooq.lambda.function.Function3
Function0
Function16