lexical, clojure

public static Predicate<String> methodName(final String letter) {
  return name -> name.startsWith(letter);
}

final Function<String, Predicate<String>> startsWithFoo =
  (String letter) -> {
    Predicate<String> checkLetter =
      (String name) -> name.startsWith(letter);
    return checkLetter;
  };

final Function<String, Predicate<String>> startsWithFoo = 
  (String letter) -> (String name) -> name.startsWith(letter);

final Function<String, Predicate<String>> startsWithFoo = 
  letter -> name -> name.startsWith(letter);

Remove all ads