Created
February 4, 2019 10:11
-
-
Save stevencurtis/7d9d398f8a09cf1edfe009632e724f4b to your computer and use it in GitHub Desktop.
Factorial Recursive
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
func fact (_ num: Int) -> Int { | |
if num == 1 {return 1} | |
return num * fact(num - 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment