             (ref-schema 'D)
             (ref-schema 'DD))
    (spec 'D {:now 3}))
-  (doall (parents-for-type 'D)))
+    #_(doall (ancestor-typs 'D))
+  (doall (parents-for-type2 'D)))
 
 (defn get-paths-for-type [root typ]
   (vec

      (empty? filtered-errors) (/ complex 2.0)
      :else false)))


(defn parents-for-type [typ']
  (concat (not-empty
           (for [[ky _ [parent-type _ typ]] (schema-rules :-)
                 :when (= typ typ')]
             [ky parent-type]))
          (not-empty
           (apply concat
                  (for [[up-type _ typ] (schema-rules :--)
                        :when (= typ typ')]
                    (parents-for-type up-type))))))

#_(with-schema
  (index-spec
   (spec 'Rooter {:hi (ref-schema 'A)})
   (or-spec 'A
            (ref-schema 'B)
            (ref-schema 'BB))

            (ref-schema 'D)
            (ref-schema 'DD))
   (spec 'D {:now 3}))
  (doall (descendent-typs 'B)))

(defn all-predicates [parent-type]
  (keep leaf-pred? (cons parent-type (descendent-typs parent-type))))

#_(with-schema (index-spec (spec 'Integer integer?)
                         (spec 'AnotherInt string?)
