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