繰り返し : common lisp
common lispで繰り返し ;;;再帰を使う方法 (defun repeat1(x) (if (< x 0) 'nil (progn (print x) (repeat1 (- x 1))))) (repeat1 10) (defun repeat2(x) (cond ((< x 0)'nil) (t (print x) (repeat2 (- x 1))))) (repeat2 10) ;;loopマクロを使う方法 (loop for x from 10 downto 1 do(print x))