Actions
Feature #13807
closedA method to filter the receiver against some condition
Feature #13807:
A method to filter the receiver against some condition
Status:
Closed
Assignee:
-
Target version:
-
Description
I frequently see code that uses some value if that value satisfies a certain condition, and something else otherwise.
And in most cases, the value of a is non-nil when the condition is satisfied.
I propose to have a method, perhaps named verify, which would implemented to be equivalent to this definition:
Then, we can write the expression above (assuming a is non-nil when the condition is satisfied) like this:
Perhaps it would also be useful to do something like:
Actions