Skip to content

Instantly share code, notes, and snippets.

@jmhdez
Created November 14, 2014 15:03
partial vs func
(def double-partial (partial * 2))
(defn double-fn [x] (* 2 x))
(time
(dotimes [n 10000000]
(double-partial 5)))
;; => "Elapsed time: 3139.323652 msecs"
(time
(dotimes [n 10000000]
(double-fn 5)))
;; => "Elapsed time: 489.968137 msecs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment