public static <T, R, E extends Exception> Function<T, R> sneaked(
      SneakyFunction<T, R, E> function) {
    return t -> {
      @SuppressWarnings("unchecked")
      SneakyFunction<T, R, RuntimeException> f1 = (SneakyFunction<T, R, RuntimeException>) function;
      return f1.apply(t);
    };
  }
public static < T , R , E extends Exception > Function < T , R > sneaked ( SneakyFunction < T , R , E > function ) { return t -> { @ SuppressWarnings ( "unchecked" ) SneakyFunction < T , R , RuntimeException > f1 = ( SneakyFunction < T , R , RuntimeException > ) function ; return f1 . apply ( t ) ; } ; }
Sneaky throws a Function lambda.

@param function Function that can throw an exception
@param <T> type of first argument
@param <R> type of the second argument
@return a Function as defined in java.util.function