I'm currently learning Clojure - I am sure there is a better solution, but this seems to work.
(defn string-side [y n]
(reduce str (repeat (/ n 2) y)))
(defn middle-me [x y n]
(if (not= (mod n 2) 0)
(let [side (string-side y n)]
(str side x side))))
(defn -main 
(println (middle-me "*" "T" 4)))
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.