public static < T , R > Consumer < T > consumer ( Function < T , R > function ) { dbc . precondition ( function != null , "cannot adapt a null function" ) ; return function :: apply ; }
Adapts a function to an consumer .