   (patch [this edit]
     (println "You done goofed!")
     (println (pr-str this))
-    (println (pr-str edit))))
+    (println (type this))))
+
+(extend-type default
+  impl/WithTransformableEdit
+  (transform [this _ _]
+    (println "You done goofed!")
+    (println (pr-str this))
+    (println (type this))))
+
+(defn- rand-char [] ((vec (map char (range 97 123))) (rand-int 26)))
 
 (defn x-ray
   [data owner]

                        {:key :id
                         :opts {:parent-data (get data :counters)}}))))))

(def app-state {:counters (mapv (fn [n] {:id n :value ""}) (range 10))})
(def !app-state (atom app-state))
(def !composed (atom {}))
(def !transformed (atom {}))

(defn tx-listener
  [{:keys [path old-value new-value old-state new-state]}]
  (let [edit-map {path (transom/diff old-value new-value)}
        test-map {[:counters 1 :value] [[:insert "fuck"]]
                  [:counters] [[:retain 5] [:insert [{:id -1 :value "blah"}]] [:retain 5]]}
        new-state' (transom/patch old-state edit-map)]
    (swap! !composed #(transom/compose old-state % edit-map))
    (let [[test-map' composed'] (transom/transform app-state
                                                   test-map
                                                   @!composed)]
      (println (pr-str test-map'))
      (println (pr-str composed'))
      (when-not (= (transom/patch app-state test-map composed')
                 (transom/patch app-state @!composed test-map'))
        (println "You done goofed!")
        (println
          (str
            \newline
            (pr-str (transom/patch app-state test-map composed'))
            \newline
            (pr-str (transom/patch app-state @!composed test-map'))))))
    (let [new-state'' (transom/patch app-state @!composed)]
      (assert (= new-state new-state' new-state'')
              (str \newline (pr-str new-state)
                   \newline (pr-str new-state')
                   \newline (pr-str new-state''))))))

(om/root
  counter-view

  (letfn
    [(create [_]
       (om/transact! data [:counters]
                     #(conj % {:id (-> % last :id inc)
                               :value (apply str (repeat (inc (rand-int 5)) "g"))})))]
    (reify
      om/IRender
      (render [_]
