condはちょっと煩雑なのでswitch
(defun color (fruit) (case fruit ((apple) 'red) ((banana lemon) 'yellow) ((peach) 'pink) (otherwise "I don't know."))) (print (color 'lemon)) (print (color 'banana)) (print (color 'peach))
YELLOW YELLOW PINK
condはちょっと煩雑なのでswitch
(defun color (fruit) (case fruit ((apple) 'red) ((banana lemon) 'yellow) ((peach) 'pink) (otherwise "I don't know."))) (print (color 'lemon)) (print (color 'banana)) (print (color 'peach))
YELLOW YELLOW PINK