Skip to content

Instantly share code, notes, and snippets.

Avatar

Gerbrand van Dieyen gerbrand

View GitHub Profile
@timyates
timyates / Currying.java
Last active March 7, 2020 07:11
Currying and composition in Java 8
View Currying.java
package java8tests ;
import java.util.function.BiFunction ;
import java.util.function.Function ;
public class Currying {
public void currying() {
// Create a function that adds 2 integers
BiFunction<Integer,Integer,Integer> adder = ( a, b ) -> a + b ;