anyfn
Summary
True if one predicate returned logical true when applied to arguments.
Description
Takes one or more predicates and returns a function
that takes any number of arguments and returns true
if one predicate returned logical true when applied to these arguments.
Returns false
if none did.
Examples
Make sure that both x and y are either numbers or strings.
1 2 3 4 5 6 7 8 9 |
|
Parameters
Name | Type | Description |
---|---|---|
fn | function |
One or more predicates |
Return
function