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
.
memq(2, [1, 2, 3, 4, 5])
// [2, 3, 4, 5]
memq("hi", [1, 2, "hi", 4, 5])
// false