2 ms·
They're called "thrush" operators, and they translate that code to this: (defn ping [] (:content (http/get "http://localhost:5123" :as :string)))
by mcav 16y ago
They're called "thrush" operators, and they translate that code to this:
(defn ping []
(:content (http/get "http://localhost:5123" :as :string)))
(defn multi-ping []
(apply str (repeatedly 16 #(ping)))
More examples: http://debasishg.blogspot.com/2010/04/thrush-in-clojure.html http://debasishg.blogspot.com/2010/04/thrush-in-clojure.html