### The Maxima on-line user's manual

Algebra Calculator

#### Member

Function: member (<expr_1>, <expr_2>) Returns `true` if `is(<expr_1> = <a>)` for some element <a> in `args(<expr_2>)`, otherwise returns `false`.

`expr_2` is typically a list, in which case `args(<expr_2>) = <expr_2>` and `is(<expr_1> = <a>)` for some element <a> in `expr_2` is the test.

`member` does not inspect parts of the arguments of `expr_2`, so it may return `false` even if `expr_1` is a part of some argument of `expr_2`.

See also `elementp`.

Examples:

```          (%i1) member (8, [8, 8.0, 8b0]);
(%o1)                         true
(%i2) member (8, [8.0, 8b0]);
(%o2)                         false
(%i3) member (b, [a, b, c]);
(%o3)                         true
(%i4) member (b, [[a, b], [b, c]]);
(%o4)                         false
(%i5) member ([b, c], [[a, b], [b, c]]);
(%o5)                         true
(%i6) F (1, 1/2, 1/4, 1/8);
1  1  1
(%o6)                     F(1, -, -, -)
2  4  8
(%i7) member (1/8, %);
(%o7)                         true
(%i8) member ("ab", ["aa", "ab", sin(1), a + b]);
(%o8)                         true```

There are also some inexact matches for `member`. Try `?? member` to see them.

```(%o1)                                true
(%i2) ```

### Related Examples

##### member

member(a,[b,c,d,a1]);

Calculate

? member;

Calculate

##### member

member(a,[b,c,d,a]);

Calculate

##### member

member(a,[b,c,d,a]);

Calculate

##### member

member([true,true],[[...

Calculate

##### member

member([true,true],[[...

Calculate

##### member

member(1, [1,2,3]);

Calculate

##### member

member([true,true],[[...

Calculate

##### member

member([true,true],[[...

Calculate

##### member-setify

member (8, setify([8,...

Calculate