docs: static <R> BiPredicate<R, Throwable> resultPredicateFor(Predicate<R> resultPredicate) {
      return (t, u) -> {
        if (u == null) {
          return resultPredicate.test(t);
        } else {
          // resultPredicate is only defined over the success type.
          // It doesn't know how to handle a failure of type Throwable,
          // so we return false here.
          return false;
        }
      };
    }