assq

(assq obj alst)


Description:

Finds the pair who's car is eq? to obj.


Arguments:

           alst -- the associative list to search

            obj -- a scheme object to search for


Returns: the pair who's car is eq? to obj or #f


Related: assoc assv acons 


Examples:

(assq 4 '((4 . "four") (5 . "five"))) => #f


(define a 4)

(assq a `((,a . "four") (5 . "five"))) => (4 . "four")



Back to index