WLJS LogoWLJS Notebook

MemberQ

MemberQ[list, form] returns True if an element of list matches form, and False otherwise.

Examples

Check membership:

MemberQ[{a, b, c}, b]
(* True *)

MemberQ[{a, b, c}, d]
(* False *)

With patterns:

MemberQ[{1, 2, 3}, _Integer]
(* True *)

Please visit the official Wolfram Language Reference for more details.

On this page