 
 (defn delta [old-state]
   (if old-state
-   (let [os (.getIfPresent cache! old-state)]
-      (println "exists!")
+    (let [os (.getIfPresent cache! old-state)]
+      (when os (debug "Cache hit:" os))
       (ddiff [] os (:state @current-state) #{}))
-   (ddiff [] nil (:state @current-state) #{})))
+    (ddiff [] nil (:state @current-state) #{})))
 
 (defn groovy [s x cls]
   (case (.getMaximumNumberOfParameters cls)

           com.google.common.cache.CacheBuilder
           java.util.concurrent.TimeUnit))

(declare ddiff)

(def cache! (.. (CacheBuilder/newBuilder) (expireAfterWrite 5 TimeUnit/SECONDS) (build)))

(def current-state 
  (atom {:state nil 
         :current 0}))

(defn store! [state]
  (swap! current-state 
    (fn [cs] 
      (let [nk (inc (:current cs))]
      (.put cache! (str nk) state)
      (println "just stored" (.getIfPresent cache! (str nk)))
      (assoc cs :state state :current nk)))))

(defn arg-count [f]
  (let [m (first (.getDeclaredMethods (class f)))

        new-state (transfunc (:state @current-state))]
    (store! new-state)))

(defn vector-diff-same-length [path a b diffs]
  (debug "vector-diff-same-length" a b "@" path " : " diffs)
  (reduce (fn [d index]
            (let [itm (get b index)
                  oitem (get a index)]
