Skip to content

Instantly share code, notes, and snippets.

@chrisledet
Created April 25, 2013 19:36
Show Gist options
  • Select an option

  • Save chrisledet/5462498 to your computer and use it in GitHub Desktop.

Select an option

Save chrisledet/5462498 to your computer and use it in GitHub Desktop.
Sums up all elements in list
(defn summer
[nums]
(if (= (count nums) 1)
(peek nums)
(+ (summer (pop nums)) (peek nums))
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment