            (list?? x))
        (empty? (rest x))))
 
+
+(defn complex-value? [v]
+  (or (list?? v) (map?? v) (fn? v) (-> v meta :ref)))
+
+(def simple-value? (complement complex-value?))
+
 (defn prep-key [k]
   (if (fn? k)
     (keyword (str "pred-key_" (hash k)))
     k))
 
-(defn handle-key-type [orig-key predicate-key-name node t]
-  (if (fn? orig-key)
-    [[predicate-key-name :?- [node :> t]]
-     [predicate-key-name :k= orig-key]]
-    [[orig-key :- [node :> t]]]))
-
 (defn decompose [type-gen-fn node' s']
-  (letfn [(decomp [node s]
+  (letfn [(handle-key-type [orig-key predicate-key-name node t]
+            (if (fn? orig-key)
+              [[predicate-key-name :?- [node :> t]]
+               [predicate-key-name := orig-key]]
+              [[orig-key :- [node :> t]]]))
+          (decomp [node s]
             (if (nil? s)
               nil
               (let [[[k' v] & r] s

(defmethod predicate-explain integer? [_ value] "Integer")
(defmethod predicate-explain string? [_ value] "String")
(defmethod predicate-explain symbol? [_ value] "Symbol")
(defmethod predicate-explain keyword? [_ value] "Keyword")

(defmethod predicate-explain named? [_ value] "String, Keyword, or Symbol")

      ))))

(pprint-document (summerize-map {:asdf 4 :Asdf 5 :fdas 7}) {:width 10})

(pprint-document [:align 10
                  "asdfasdf\nasdfasdfasd\n"] {})

(pprint-document (summerize-value #{1 2 }) {:width 40})

