summary refs log tree commit diff stats
path: root/clojure/raindrops/src/raindrops.clj
blob: 8815f2db854438c25f57bc6bc51393042584845f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(ns raindrops)

(defn convert [number]
  (def drops "")

  (if (== (mod number 3) 0)
    (def drops (str drops "Pling")))
  (if (== (mod number 5) 0)
    (def drops (str drops "Plang")))
  (if (== (mod number 7) 0)
    (def drops (str drops "Plong")))

  (if (= drops "")
    (def drops (str number)))
  drops)