Created
February 14, 2018 02:49
-
-
Save arthurmco/417c3986c0b2785bcc361697d7f7517f to your computer and use it in GitHub Desktop.
small clojure factorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn factorial [num] | |
(reduce * (map inc (range num)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment