Skip to content

Instantly share code, notes, and snippets.

@trendsetter37
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trendsetter37/7390c782df547a40cd8b to your computer and use it in GitHub Desktop.
Save trendsetter37/7390c782df547a40cd8b to your computer and use it in GitHub Desktop.
Computes the factorial of an integer
(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