Skip to content

Instantly share code, notes, and snippets.

@pingles
Created October 13, 2010 12:23
Show Gist options
  • Save pingles/623913 to your computer and use it in GitHub Desktop.
Save pingles/623913 to your computer and use it in GitHub Desktop.
(defn divisible-by-3-or-5
[n]
(or (= 0
(mod n 3))
(= 0
(mod n 5))))
(defn sum
[xs]
(reduce + xs))
(sum (filter divisible-by-3-or-5 (range 1 1000)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment