more @FunctionalInterfaces with some helpful extras
Where applicable the supplied @FunctionalInterfaces implement the methods applyLeft and applyRight
IntBiConsumer biCon = (a, b) -> System.out.println("first: " + a + " second: " + b);
IntConsumer leftAppliedBiCon = biCon.aptFirst(5);
leftAppliedBiCon.accept(23);
Output:
first: 5 second: 23
IntBinaryOperator div = (a, b) -> a / b;
IntUnaryOperator divBy3 = div.aptLast(3);
System.out.println(divBy3.apply(7));
Output:
2
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/kryptonbutterfly/maven-repo</url>
</repository>
<dependency>
<groupId>kryptonbutterfly</groupId>
<artifactId>better_functionals</artifactId>
<version>3.0.0</version>
</dependency>
java version | library version | Download |
---|---|---|
18+ | 3.0.0 | better_functionals-3.0.0.jar |
18+ | 2.0.0 | better_functionals-2.0.0.jar |
18+ | 1.0.0 | BetterFunctionals.jar |