Project Euler with Clojure 1

I am learning Clojure by doing Project Euler problems and building a web crawler for Amazon products. This is the solution that I have come up with, I filter all the numbers from a range given the two constraints and then I add them up using reduce. It’s definitely sloppy as I didn’t even know how to make this a bit more general instead of making this work only for 1000 (good enough for PE). I’d appreciate much tweets with suggestions on improvements. The wording is as follows:

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.

Leave a Reply

Your email address will not be published. Required fields are marked *


*