Created
February 27, 2018 18:34
-
-
Save theRemix/68ccccc2d7621f015afa6f592d3e9ca7 to your computer and use it in GitHub Desktop.
BlondPiercingTechnician created by theRemix - https://repl.it/@theRemix/BlondPiercingTechnician
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [base 3, | |
exp 3] | |
(do | |
(defn multiply [x, y] | |
(* x y)) | |
(defn exponent | |
([base pow] (exponent base base (dec pow))) | |
([acc base pow] (cond | |
(> pow 0) (exponent (multiply acc base) base (dec pow)) | |
:else acc))) | |
(exponent base exp))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment