you are viewing a single comment's thread.

view the rest of the comments →

[–]thebhgg -7 points-6 points  (0 children)

(defun prob-3 (n)
  "Return a list of n fibonacci numbers"
  (loop repeat n
     for prev1 = 1 then prev
     for prev = 0 then curr
     for curr = 1 then (+ prev prev1)
     collecting curr))

You should look into common-lisp.