          (js! (:js x))))
 
 (defn ref! [x]
-  (check
-   (case (:type x)
-     :ref/id (ref-id! x)
-     :ref/js (ref-js! x)
-     false)))
+  (case (:type x)
+    :ref/id (check (ref-id! x))
+    :ref/js (check (ref-js! x))
+    (check false)))
 
 (defn tag! [x]
   (check (= :tag (:type x))

         (pattern! (:pattern x))))

(defn pattern! [x]
  (check
   (cond
    (= :match/any (:type x) (match-any! x))
    (= :match/bind (:type x) (match-bind! x))
    (= :tag (:type x)) (tag! x)
    (#{:ref/id :ref/page} (:type x)) (ref! x)
    (number? x) true
    (string? x) true
    (vector? x) (every? pattern! x)
    (map? x) (and (every? data! (keys x)) (every? pattern! (vals x))))))

(defn pattern! [x]
  (check (= :type )))

(defn action! [x]
  (check
   (case (:type x)
     :call (call! x)
     :constant (constant! x)
     false)))

(defn branch! [x]
  (check (= :match/branch (:type x))

         (every? branch! (:branches x))))

(defn step! [x]
  (check (id! (:id x)))
  (case (:type x)
    :call (check (call! x))
    :constant (check (constant! x))
    :match (check (match! x))))

(defn page! [x]
  (check (= :page (:type x))
