; Display n numbers from the Fibonacci sequence. ; ; Afternoon <noon at aftnn.org>, 2006 (defun sumlast2 (l) (+ (first (last (butlast l))) (first (last l)))) (defun fibseq (n) (cond ((= n 1) '(1)) ((= n 2) '(1 1)) (t (let ((fs1 (fibseq (1- n)))) (append fs1 (list (sumlast2 fs1))))))) (write-line (format nil "~{~A~^, ~}" (fibseq (parse-integer (first *args*)))))