member? ( elt seq -- ? )
Factor handbook > The language > Collections > Sequence operations > Testing sequences

Prev:bounds-check? ( n seq -- ? )
Next:member-eq? ( elt seq -- ? )


Vocabulary
sequences

Inputs and outputs
eltan object
seqa sequence
?a boolean


Word description
Tests if the sequence contains an element equal to the object.

Examples
Is a letter in a string:
USING: sequences prettyprint ; CHAR: a "abc" member? .
t


Is a number in a sequence:
USING: sequences prettyprint ; 4 { 1 2 3 } member? .
f


Notes
This word uses equality comparison (=).

See also
sorted-member?

Definition