   (if (sequence-like? parent-value) 0 k))
 
 (defn find-keyword-predicate [parent-type]
-  (when-let [[pred-id _ [pt _ kt]] (first (*schema-rules* [:parent :?- parent-type]))]
-    (when-let [pred-func (last (first (*schema-rules* [:= pred-id])))]
+  (when-let [[pred-id _ [pt _ kt]] (first (schema-rules [:parent :?- parent-type]))]
+    (when-let [pred-func (last (first (schema-rules [:= pred-id])))]
       [pred-func kt])))
 
 ;; this is what implements or


(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))))))


          :path     (:path     state)}]))))

(defn required-keys-for-type [parent-type]
  (set (for [[t _ k]  (schema-rules [:requires-key parent-type])
                  :when (= t parent-type)]
              k)))

