ddimtirov / nuggets

nuggets is (yet another) utility library for Java
https://ddimtirov.github.io/nuggets/javadoc/io/github/ddimitrov/nuggets/package-summary.html
Apache License 2.0
4 stars 1 forks source link

'Predicate' combinator for JDK functional objects #25

Closed ddimtirov closed 7 years ago

ddimtirov commented 8 years ago

Return the result of the first function that matches a predicate. Accept a parameter (boolean or predicate) whether to ignore or rethrow exceptions.

ddimtirov commented 7 years ago

Combined with https://github.com/ddimtirov/nuggets/issues/24 - fallbacks and result validation have non-composable interaction, so they needed to be part of the same primitive.

If we find a composable abstraction, we should split them.