memq


memq(x, xs)
      

Return the first tail of the list xs whose head is equivalent to x. Return false if x is not found in xs.

The equivalence test for memq is is_eq.

Examples:


memq(2, [1, 2, 3, 4, 5])
// [2, 3, 4, 5]

memq("hi", [1, 2, "hi", 4, 5])
// false
      

Also see:

member
memv


Core Module Index | Contents