; Get the variables passed into your expression DSL
; ------------------------------
; The Little Lisper 3rd Edition
; Chapter 7
; Exercise 8
; Common Lisp
; http://t...content-available-to-author-only...r.com/thelittlelisper
; http://t...content-available-to-author-only...t.com/2010/06/little-lisper-chapter-7-shadows.html
; http://t...content-available-to-author-only...t.com/2010/06/little-lisper.html
; ------------------------------
(setf l1 '())
(setf l2 '(3 + (66 6)))
(setf aexp4 5)
; ------------------------------

(defun lookup (a lat)
  (cond
   ((null a) NIL)
   ((null lat) NIL)
   ((eq a (car (car lat)))
    (cdr (car lat)))
   (t 
    (lookup a (cdr lat)))))

(print (lookup 'y '((x 1)(y 0))))
;0

(print (lookup 'x '((x 1)(y 0))))
;1

(print (lookup 'u '((u 1)(v 1))))
;1

(print (lookup 'y '()))
;NIL  no answer
