Clojure
(def ^:dynamic fc \/)
(def ^:dynamic sc \\)
(defn spaces [size]
(apply str (repeat size " ")))
(defn linestr[size line-no]
(let [sp (spaces size )
fh (doto (StringBuilder. sp)
(.setCharAt (- size line-no) fc)
(.toString))
sh (.replace (apply str (reverse fh)) fc sc) ]
(str fh sh)))
(defn linestr-x[number size line-no]
(apply str (repeat number (linestr size line-no))))
(defn print-all[number size]
(loop [line-no 1 lines []]
(if (> (inc size) line-no)
(recur (inc line-no) (conj lines (linestr-x number size line-no)))
lines)))
(defn diamond[number size]
(let [fh (print-all number size) ]
(binding [fc \\ sc \/]
(flatten [fh (reverse (print-all number size)) ]))))
(defn print-diamond[size cols rows]
(doseq [x (flatten (repeat rows (diamond cols size))) ]
(println x)))
(print-diamond 4 3 1)
user=> (print-diamond 1 10 3 )
/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\/\/\/\/\/\/
/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\/\/\/\/\/\/
/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\/\/\/\/\/\/