Membership

, also called Member In, Member Of, or Element Of, is a dyadic primitive function which tests if each of the elements of the left argument appears as an element of the right argument. Membership derives from the traditional mathematical notation $$\in$$ (Element of) and therefore uses that glyph (lunate epsilon).

Examples
Both arguments can be arrays of any shape. Each element of the left argument is tested against elements of the right argument, and the result is a boolean array having the same shape as the left argument.

For nested arrays, Membership tests for exact match between the elements.

Leading axis model
The behavior of Membership was changed to follow leading axis model in some implementations such as J (spelled ). In this case, if the right argument is a higher-rank array, the cells of the left argument with appropriate rank are compared against the major cells of the right argument.

In other dialects, a leading axis membership function can be defined as:

Documentation

 * Dyalog
 * APLX
 * J Dictionary, NuVoc
 * BQN