Skip to content

Instantly share code, notes, and snippets.

@ardbytes
Created May 21, 2013 17:59
Show Gist options
  • Save ardbytes/5621855 to your computer and use it in GitHub Desktop.
Save ardbytes/5621855 to your computer and use it in GitHub Desktop.
Factorial in Clojure
(defn factorial [n]
(apply * (range 1 (inc n))))
(println (format "Factorial of 5 is: %s" (factorial 5)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment