@ Pure public static < P1 , P2 , RESULT > Function1 < P2 , RESULT > curry ( final Function2 < ? super P1 , ? super P2 , ? extends RESULT > function , final P1 argument ) { if ( function == null ) throw new NullPointerException ( "function" ) ; return new Function1 < P2 , RESULT > ( ) { @ Override public RESULT apply ( P2 p ) { return function . apply ( argument , p ) ; } } ; }
Curries a function that takes two arguments .