Created
September 3, 2016 03:47
-
-
Save chrisbodhi/a20fc64ef31ff4d6e8910b8842d1b886 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| "Returns the factorial of the supplied number" | |
| [n] | |
| (reduce * (into [] (range 1 (inc n))))) | |
| (factorial 5) | |
| ; => 120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment