             (->Match data (assoc params param path)))))
       (get-segment [this]
         segment)
+      (set-data [this data]
+        (wild-node segment param children data))
       (add-child [this key child]
         (wild-node segment param (assoc children key child) data))
       (insert-child [this key path-spec o]

                common (subs path-spec 0 lcs)]
            (if (= common segment)
              (let [path-spec (subs path-spec (inc lcs))]
                (insert-child node (subs path-spec 0 1) path-spec o))
              (throw (ex-info "route conflict"
                              {:node node
                               :path-spec path-spec

(defn- make-node
  "Given a path-spec segment string and a payload object, return a new
  tree node."
  [segment data]
  (cond
    (wild-param? segment)
    (wild-node segment (keyword (subs segment 1)) nil data)

    (catch-all-param? segment)
    (catch-all-node segment (keyword (subs segment 1)) nil data)

    :else
    (static-node segment nil data)))

(defn- new-node
  "Given a path-spec and a payload object, return a new tree node. If
  the path-spec contains wildcards or catch-alls, will return parent
  node of a tree (linked list)."
  [path-spec data]
  (if (contains-wilds? path-spec)
    (let [parts (partition-wilds path-spec)]
      (reduce (fn [child segment]
