Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn rainbow-print [msg]
- (let [colors ["31m" "32m" "33m" "34m" "35m" "36m" "37m"]
- costr (fn [color msg] (str "\033[" color msg "\033[m"))]
- (println
- (str (apply str (map #(costr (rand-nth colors) %) (clojure.string/split msg #"\d*")))))))
Add Comment
Please, Sign In to add comment