                                         :enter  enter
                                         :update update
                                         :exit exit
+                                        :pre-fn pre-fn
                                         :post-fn post-fn)))
                    @data)
+               data)
+        
+        data (if pre-fn
+               (pre-fn data)
                data)
 
 

            (if (exit datum idx node)
              (gdom/removeNode node))))

    
    ;;For each datum, update existing nodes and add new ones
    (iter {for [idx d] in (map-indexed vector data)}
          (let [new-node (attach-data (cannonicalize (mapping d idx)) d)]

Automatically updates elements mapped to data according to key-fn (defaults to index) and removes elements that don't match.
Scoped to selector, if given, otherwise applies to all container's children.
Optional enter, update, and exit functions called before DOM is changed; return false to prevent default behavior."
  [container data mapping & {:keys [selector key-fn pre-fn post-fn update exit enter]
                             :or {key-fn (fn [d idx] idx)
                                  enter  (fn [d idx new-node]
                                           #_(p "no-op enter called")
