memq

(memq 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 -- object

            lst -- list


Returns: list or #f


Related: member memv 


Examples:



Back to index