member - test if elements are members of a set
res =
lhs.member(rhs)
Checks if each element of lhs is present in rhs.
This is similar to APL
val ∈ arr.
If lhs is a scalar, the result is a boolean indicating whether the scalar is in rhs.
If lhs is an array, the result is a boolean array of the
same shape as lhs, where each element is true if
the corresponding element of lhs exists in rhs, and
false otherwise.
The implementation uses an internal dictionary for efficient lookup if rhs is large.
Returns a boolean or a boolean array.
ArgCheck: Thrown if the number of arguments is not 2.
3->member([1, 2, 3, 4])
true
[1, 5, 2].member([1, 2, 3])
true false true
"a".member("banana") // (checks characters in the string)
true