Skip to content

Instantly share code, notes, and snippets.

@christianromney
Created May 20, 2011 14:38
Show Gist options
  • Save christianromney/983038 to your computer and use it in GitHub Desktop.
Save christianromney/983038 to your computer and use it in GitHub Desktop.
Naive fibonacci
(defn fib [x]
{:pre [(>= x 0)]}
(if (< x 2) x
(+ (fib (- x 1)) (fib (- x 2)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment