Skip to content

Instantly share code, notes, and snippets.

@woliveiras
Created April 15, 2018 21:59
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 woliveiras/ba445a4e370755734ac541ba298ec0c0 to your computer and use it in GitHub Desktop.
Save woliveiras/ba445a4e370755734ac541ba298ec0c0 to your computer and use it in GitHub Desktop.
(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