member
test for membership in a data structure, function, or module
Calling Sequence
Parameters
Description
Thread Safety
Examples
Compatibility
member(x, s, 'p')
x
-
expression
s
set, list, rtable, table, function, sum, product, or module
'p'
(optional) unevaluated name
The function member determines if x is a member of the set, list, Array, Matrix, Vector, table, function, or module s. It returns true if so, and false otherwise.
If s is a table, member tests whether x is a value in the table.
If a third argument 'p' is present and member yields true, the position of the first x in s is assigned to p in the case of sets, lists, and functions, while the member instance is assigned to the name p if s is a module. Position is determined as the index in the case of an rtable or module, and ith operand in the case of other data-structures.
The member command is thread safe as of Maple 15, provided that the name p, if used, is not shared between threads.
For more information on thread safety, see index/threadsafe.
member⁡y,x,y,z
true
member⁡y,x⁢y,y⁢z
false
member⁡x⁢y,x⁢y,w+u,y
member⁡y,table⁡x,y,z
member⁡w,x,y,w,u,k
k
3
member⁡v,f⁡u,v,w,k
2
m ≔ module_export⁡eend module:
member⁡e,m
member⁡e,m,p:
p
e
member⁡f,m
The member command was updated in Maple 2023.
The s parameter was updated in Maple 2023.
See Also
function
has
in
list
membertype
module
set
Download Help Document