code: public static <I,O> BoolExprPattern<I,O> matches(Function<I,Boolean> expr, Function<I,O> f) {
          return new BoolExprPattern<I, O>(expr, f);
      }
docs: Allows you use a lambda to match on an input.
  @param expr expression that evaluates to true/false
  @param f function that produces O from I
  @param <I> Input
  @param <O> Output
  @return pattern that matches on the expression