     (#{:ref/js :ref/step :ref/page} (:type x)) (ref! x)
     :else false)))
 
+(defn constant! [x]
+  (check (= :constant (:type x))
+         (data! (:data x))))
+
 (defn pattern! [x]
   (check
    (cond

  (check (id! (:id x))
         (case (:type x)
           :call (call! x)
           :data (data! x)
           :match (match! x))))

(defn page! [x]
  (check (= :page (:type x))
         (id! (:id x))
         (sequential? (:steps x))
         (every? step! (:steps x))))

(defn notebook [x]
  (check (= :notebook (:type x))
         (id! (:id x))
         (sequential? (:pages x))
         (every? page! (:pages x))))



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

