58 |
(cdr arg-list)))))) |
(cdr arg-list)))))) |
59 |
it)) |
it)) |
60 |
|
|
61 |
|
;; return true if lists X and Y are the same length and each element is `eq?' |
62 |
|
(define (eq?-list x y) |
63 |
|
(if (null? x) |
64 |
|
(null? y) |
65 |
|
(and (not (null? y)) |
66 |
|
(eq? (car x) (car y)) |
67 |
|
(eq?-list (cdr x) (cdr y))))) |
68 |
|
|
69 |
(define (funcq-assoc arg-list alist) |
(define (funcq-assoc arg-list alist) |
70 |
(let ((it (and alist |
(if (null? alist) |
71 |
(let and-map ((key arg-list) |
#f |
72 |
(entry (caar alist))) |
(if (eq?-list arg-list (caar alist)) |
73 |
(or (and (and (not key) (not entry)) |
(car alist) |
74 |
(car alist)) |
(funcq-assoc arg-list (cdr alist))))) |
|
(and key entry |
|
|
(eq? (car key) (car entry)) |
|
|
(and-map (cdr key) (cdr entry)))))))) |
|
|
it)) |
|
75 |
|
|
76 |
|
|
77 |
|
|