Skip to content

Instantly share code, notes, and snippets.

@yedi yedi/gist:3110511
Created Jul 14, 2012

Embed
What would you like to do?
(ns clojeuler.q1)
(defn sum-if-divisible [num1 num2]
(if (or (== (mod num2 3) 0) (== (mod num2 5) 0))
(+ num1 num2)
num1))
(println (reduce sum-if-divisible (range 1 1000)))
(println (reduce + (range 1 1000)))
---Output---
user>
233169^M
499500^M
How do I make it print out the actual number?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.