Created
April 15, 2018 21:59
-
-
Save woliveiras/ba445a4e370755734ac541ba298ec0c0 to your computer and use it in GitHub Desktop.
This file contains 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
(defn my-recursive-sum | |
([numbers] (my-recursive-sum 0 numbers)) | |
([total numbers] | |
(if (empty? numbers) | |
total | |
(recur (+ (first numbers) total) (rest numbers))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment