Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (16 sloc) 521 Bytes
(defn loves [x y]
(str x " loves " y))
(defn test-rebind []
(println (loves "ricky" "lucy"))
(let [str-orig str]
(binding [str (fn [& args]
(println "Logging str")
(apply str-orig args))]
(println (loves "fred" "ethel")))))
(defn test-rebind-2 []
(println (loves "ricky" "lucy"))
(let [loves-orig loves]
(binding [loves (fn [& args]
(println "Logging str")
(apply loves-orig args))]
(println (loves "fred" "ethel")))))
Jump to Line
Something went wrong with that request. Please try again.