exists(fn, @rest xs1, ...)
Return a truth value if applying fn
to the corresponding elements of the lists xs1, ...
return true
at least once, otherwise return false
.
All the lists must be of the same length. The function fn
should accept as many arguments as there are
lists and should not mutate the lists.
exists(is_symbol, [1, \a, "hello"])
// false
exists(is_symbol, [1, \a, 'hello])
// true
exists(member, [1, 2, 3], [[3, 2], [2, 1], [1, 3]])
// [2, 1]
exists(^(x, y, z) x + y == z,
[1, 2, 3, 4],
[1.2, 2.3, 3.4, 4.5],
[2.2, 4.3, 6.5, 8.5])
// true