Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created April 1, 2013 18:25
Show Gist options
  • Select an option

  • Save thinkphp/5286684 to your computer and use it in GitHub Desktop.

Select an option

Save thinkphp/5286684 to your computer and use it in GitHub Desktop.
factorial using prog
;factorial using prog
(defun f(n)
(prog ((i 0)(f 1))
hello
(setf i (+ i 1) f (* f i))
(if (<= n i) (return f))
(go hello)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment