Created
April 15, 2018 21:57
-
-
Save woliveiras/733f244effb61e8655492d845bbd1c53 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 | |
(my-recursive-sum (+ (first numbers) total) (rest numbers))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment