Skip to content
Seonho Kim edited this page Mar 7, 2017 · 1 revision
p.465 (예제 15.4)
(defn memoization-impl [cache-impl]
  (let [cache (atom cache-impl)]
    (with-meta
      (fn [& args]
        (let [cs (swap! cache through (.f cache-impl) args)]
          @(lookup cs args)))
      {:cache cache})))
Clone this wiki locally