final boolean b = a.exists(new F<String, Boolean>() {
public Boolean f(final String s) {
return fromString(s).forall(isLowerCase);
}
});
It's here that I miss lambdas to make functional code at all readable. final boolean b = a.exists(new F<String, Boolean>() {
public Boolean f(final String s) {
return fromString(s).forall(isLowerCase);
}
});
It's here that I miss lambdas to make functional code at all readable.val b = a.exists(str=>str.forall(_.isLowerCase))
or
val b = a.exists(x=>x.toLowerCase() == x)
There's no way I'd start using functional programming in Java if it's this clunky. Just stick with Scala.
boolean b = a.any(λ(s, s.equals(s.toLowerCase()));
s and λ are statically imported.