Skip to content

Instantly share code, notes, and snippets.

@ridvanbaluyos
Created March 30, 2018 16:49
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 ridvanbaluyos/d81d19a11b173b6261ed895766107388 to your computer and use it in GitHub Desktop.
Save ridvanbaluyos/d81d19a11b173b6261ed895766107388 to your computer and use it in GitHub Desktop.
Compute for the Eth Power of B using Common Lisp
(defun power (B E)
"Compute for the Eth Power of B."
(if (= E 1)
B
(* B (power B (- E 1)))))
; or (* B (power B (1- E)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment