Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn three-or-five [num]
- (if (== (mod num 5) 0)
- num
- (if (== (mod num 3) 0)
- num
- 0)))
- (defn produce-list [range]
- (loop [total 0
- current 0]
- (do
- (if (== current range)
- total
- (recur (+ total (three-or-five current))
- (+ current 1))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement