Skip to content

Instantly share code, notes, and snippets.

@kitofr
Created May 30, 2011 18:16
Show Gist options
  • Save kitofr/999246 to your computer and use it in GitHub Desktop.
Save kitofr/999246 to your computer and use it in GitHub Desktop.
;http://4clojure.com/problem/26
#(loop [n % seq []]
(letfn [(fib [x]
(if (<= x 2)
1
(+ (fib (- x 2)) (fib(- x 1)))))]
(if (= n 0)
seq
(recur (dec n) (cons (fib n) seq)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment