(setq turtles (make-hash-table :size 9 :test 'eq))
(setq (gethash 'howard-kaylan turtles) '(musician lead-singer))
(setq (gethash 'john-barbata turtles) '(musician drummer))
(setq (gethash 'leonardo turtles) '(ninja leader blue))
(setq (gethash 'donatello turtles) '(ninja machines purple))
(setq (gethash 'al-nichol turtles) '(musician guitarist))
(setq (gethash 'mark-volman turtles) '(musician great-hair))
(setq (gethash 'raphael turtles) '(ninja cool rude red))
(setq (gethash 'michaelangelo turtles) '(ninja party-dude orange))
(setq (gethash 'jim-pons turtles) '(musician bassist))
(with-hash-table-iterator (get-turtle turtles)
(labels ((try (got-one &optional key value)
(when got-one
(when (eq (first value) 'ninja)
(format t "~%~:(~A~): ~{~A~^, ~}"
key (rest value)))
(multiple-value-call #'try (get-turtle)))))
(multiple-value-call #'try (get-turtle))))
;*******Prints*******:
;Michaelangelo: PARTY-DUDE, ORANGE
;Leonardo: LEADER, BLUE
;Raphael: COOL, RUDE, RED
;Donatello: MACHINES, PURPLE
;
;Love this author the laughter is none stop throughout the whole program lol
;Page 440 in Guy L. Steele Jr.'s book "Common Lisp: The language Second Edition" or how it
;it is known to most Computer Scientist as "The Lisp Bible".
http://en.wikipedia.org/wiki/The_Turtles
The Turtles
Teenage Mutant Ninja Turtles
Friday, February 02, 2007
Subscribe to:
Post Comments (Atom)

2 comments:
Good post.
酒店
酒店上班
酒店兼職
台北酒店
打工兼差
酒店工作
酒店經紀
禮服店
酒店兼差
酒店打工
酒店PT
酒店正職
酒店賺錢
酒店日領
酒店喝酒 酒店消費 喝花酒 粉味 喝酒
Post a Comment