 (defn watcher! [pred & dirs]
   (let [state (atom nil)]
     (fn []
-      (let [state' (apply files-for dirs)
+      (let [state' (apply tree-for dirs)
             patch' (patch pred @state state')]
         (reset! state state')
         patch'))))

                        {}))))
       (reduce (partial merge-with into) {})))

(def time-diff-memo
  (memoize
    (fn [bef aft]
      ((fn [[b a]] [(set/difference b a) a])
       (->> (data/diff bef aft) (take 2) (map (comp set keys)))))))

(defn time-diff [before after]
  (time-diff-memo (:time before) (:time after)))

(defmulti  patch-cp? (fn [pred a b] pred))
(defmethod patch-cp? :default [_ a b] true)

          outs   (map #(srcdir->outdir % src dest) files)]
      (mapv copy-with-lastmod (map io/file files) (map io/file outs)))))

(defn tree-for [& dirs]
  (->> (for [dir dirs]
         (let [path  (-> (if (string? dir) dir (.getPath dir)) (.replaceAll "/$" ""))
               snip  (count (str path "/"))]
