public static < T , U , R > Function < Pair < T , U > , R > tupled ( BiFunction < T , U , R > function ) { dbc . precondition ( function != null , "cannot apply a pair to a null function" ) ; return pair -> function . apply ( pair . first ( ) , pair . second ( ) ) ; }
Adapts a binary function to a function accepting a pair .