Last active
August 29, 2015 14:08
-
-
Save trendsetter37/7390c782df547a40cd8b to your computer and use it in GitHub Desktop.
Computes the factorial of an integer
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
(defun factorial! (number) | |
"returns the factorial of the number given" | |
(loop for x from 1 upto number | |
for y = 1 then (* x y) | |
finally (return y))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment