some
Summary
Apply functions to arguments until one returns logical true.
Description
Takes one or more functions and returns another function that takes any number of parameters.
Starting with the leftmost function applies each to the parameters until one returns logical true in which case all other functions are ignored and we return that value.
Otherwise returns whatever the last function has returned.
Examples
1 2 3 4 5 6 7 8 9 10 11 |
|
Parameters
Name | Type | Description |
---|---|---|
fns | function |
Return
function