 
 (defn DataDrill [{:keys [data] :as all}]
   (cond (map? data) [MapNode all]
-        (vector? data) [VecNode all]
+        (set? data) [SetNode all]
+        (or (vector? data) (list? data)) [ListVecNode all]
         :else [Node all]))
 
 (defn App []

    [:button {:onClick #(emit :contract path)} "-"]
    [:button {:onClick #(emit :expand path)} "+"]))

(defn VecNode [{:keys [data path expansion]}]
  (let [expanded? (get expansion path)]
    [:div
     [ExpandButton {:expanded? expanded? :path path}]
     [:span "["]
     (if expanded?
       (map-indexed (fn [i x] ^{:key i} [DataDrill {:data x :path (conj path i) :expansion expansion}]) data)
       (str (count data))
       )
     [:span "]"]]))

(defn MapNode [{:keys [data path expansion]}]
  (prn "Mapnode: " data "path: " path "expan: " expansion)
  (let [expanded? (get expansion path)]
    [:div
     [ExpandButton {:expanded? expanded? :path path}]

(enable-console-print!)

(def store (r/atom {:data {:a "a"
                           :b [1 2 3 3 {:a "a" :b "b"}]
                           :c #{1 2 3}
                           :d {:x "x" :y "y" :z [1 2 3 4]}
                           :e '(1 2 3)}
                    :expansion #{}}))

(defn emit [event args]
  (prn "Emit: " event args)
