Advertisement
Guest User

Untitled

a guest
May 19th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. (defun factorial(x)
  2. (if (= x 1)
  3. (setq a 1)
  4. )
  5. (if (> x 1)
  6. (setq a (* x (factorial (- x 1))))
  7. )
  8.  
  9. a
  10. )
  11.  
  12. (format t "~D! is ~D" 5 (factorial 5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement