code: public static <T> Predicate<T> predicate(Function<T, Boolean> function) {
          dbc.precondition(function != null, "cannot adapt a null function");
          return function::apply;
      }
docs: Adapts a function to a predicate.
  
  @param <T> the function parameter type
  @param function the function to be adapted
  @return the adapted predicate