Foo bar in Clojure

less than 1 minute read

Notes

;; foo_bar.clj

(defn foo [number]
  (if (= (mod number 3) 0)
    "foo"
    ""))

(defn bar [number]
  (if (= (mod number 5) 0)
    "bar"
    ""))

(map
 #(println % "-" (foo %) (bar %))
 (range 1 31))

Updated: