member

(member obj lst)


Description:

These procedures return the first sublist of list whose car is obj, where the sublists of list are the non-empty lists returned by (list-tail list k) for k less than the length of list. If obj does not occur in list, then #f (not the empty list) is returned. Memq uses eq? to compare obj with the elements of list, while memv uses eqv? and member uses equal?.


Arguments:

            obj -- any scheme object

            lst -- any scheme list


Returns: list or #f


Related: memv memq 


Examples:

(member 'c '(a b c d)) => (c d)

(member 'e '(a b c d)) => #f



Back to index