Skip to content

Instantly share code, notes, and snippets.

@adolfont
Created February 2, 2011 21:13
Show Gist options
  • Save adolfont/808453 to your computer and use it in GitHub Desktop.
Save adolfont/808453 to your computer and use it in GitHub Desktop.
Factorial in Clojure (taken from Seven Languages in Seven Weeks, by Bruce Tate)
(defn factorial [n]
(apply * (take n (iterate inc 1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment