; Can you rewrite your function to map it to a list?
; ------------------------------
; The Little Lisper 3rd Edition
; Chapter 9
; Exercise 1
; 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-9-lamdba-ultimate.html
; http://t...content-available-to-author-only...t.com/2010/06/little-lisper.html
; ------------------------------

(defun map_ (l func)
  (cond
   ((null l) NIL)
   (t (cons (funcall func (car l))
            (map_ (cdr l) func)))))

;firsts
(print (map_ '((paella spanish)(wine red)(and beans)) #'car))
;(PAELLA WINE AND)

(setf spanish-food '((paella spanish)(wine red)(and beans)))

(print (map_ spanish-food #'car))
;(PAELLA WINE AND)

;seconds
(defun seconds-closure (l)
  (car (cdr l)))

(print (map_ spanish-food #'seconds-closure))
;(SPANISH RED BEANS)
    

