   (let [stack #js []
         program (into {} (for [pipe example] [(:id pipe) pipe]))]
     (try
-      [(run-pipe program (get program "root") inputs stack) (aget stack 0)]
+      [(run-pipe program (get program "root") (map #(Cursor. [] %) inputs) stack) (aget stack 0)]
       (catch :default e [e (aget stack 0)]))))
+
+(set! *print-meta* true)
 
 (run-example example-a [1 4 2])
 

      (if-let [[{:keys [pattern inputs node]} & branches] (seq branches)]
        (try
          (let [vars #js {}]
            (run-match-pattern program pattern input stack vars)
            (run-node program node (map #(aget vars %) inputs) stack))
          (catch MatchFailure _
            (recur branches)))
        (throw (MatchFailure.))))))

(defn run-match-pattern [program pattern input stack vars]
  (condp = (:type pattern)
    :match/any nil
    :match/bind (do (aset vars (:var pattern) input)
                  (run-match-pattern program (:pattern pattern) input stack vars))
    :data (case (:kind pattern)
            :value (check (= input (:value pattern)))
            :vector (let [value (:value pattern)]
                      (check (vector? input))
                      (check (= (count input) (count value)))
                      (dotimes [i (count value)]
                        (run-match-pattern program (nth value i) (nth input i) stack vars)))
            :map (let [value (:value pattern)]
                   (check (map? input))
                   (doseq [key-pattern (keys value)]
                     (let [key (:value key-pattern)]
                       (check (contains? input key))
                       (run-match-pattern program (get value key-pattern) (get input key) stack vars)))))
    (check (run-node program pattern [input] stack))))

;; ast


(run-example example-c [1])
(run-example example-c [7])
(run-example example-c [10])

(defn print-stack
  ([frame]
