I would like to create a list with that contains the n number of Pell Numbers. So far, I created everything and it's functional but I can't figure out a way to print a list of the numbers. Here is my code:
(defun pell (n)
(cond
( (= n 0) 0)
( (= n 1) 1)
( (= n 2) 2)
(t (+ (* 2 (pell (- n 1))) (pell (- n 2)))))
(loop for i from 1 to n doing
(list (pell i))))
Don't think it's correct, what am I missing?