Created
October 2, 2018 14:21
-
-
Save ezmiller/8d4389645cec2ed9c17468d40bd44187 to your computer and use it in GitHub Desktop.
Recursive Factorial
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 [n] | |
(if (= n 1) | |
1 | |
(* n (factorial (- n 1))))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment