Skip to content

Instantly share code, notes, and snippets.

@dexteryy
Created August 8, 2010 06:54
Show Gist options
  • Save dexteryy/513692 to your computer and use it in GitHub Desktop.
Save dexteryy/513692 to your computer and use it in GitHub Desktop.
(defun factorial (x)
(flet ((fact (x &optional (res 1))))
(if (= 1 x)
res
(factorial (1- x) (* res x)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment