kryptonbutterfly / betterFunctionals

more @FunctionalInterfaces with some helpful extras

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

betterFunctionals Maven Package

more @FunctionalInterfaces with some helpful extras

Extra: Partial function application

Where applicable the supplied @FunctionalInterfaces implement the methods applyLeft and applyRight

Example aptFirst

IntBiConsumer biCon = (a, b) -> System.out.println("first: " + a + " second: " + b);
IntConsumer leftAppliedBiCon = biCon.aptFirst(5);
leftAppliedBiCon.accept(23);

Output:

first: 5 second: 23

Example aptLast

IntBinaryOperator div = (a, b) -> a / b;
IntUnaryOperator divBy3 = div.aptLast(3);
System.out.println(divBy3.apply(7));

Output:

2

Getting the latest release

<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>

Download

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

About

more @FunctionalInterfaces with some helpful extras

License:Apache License 2.0


Languages

Language:Java 100.0%