     (insert "/kikka/:kakka/kurkku" 4)
     (insert "/kikka/kuri/{user/doc}/html" 5)
     (compile)
-    (lookup "/kikka/kakka/kurkku"))
-
-;; =>
-
-["/"
- ["kikka" [2
-           "/" ["k" ["akka/kukka" [3]
-                     "uri/" [:user/doc [".html" [5]]]]
-                :kakka ["/kukka" [4]]]
-           "re/" [#{:path} [6]]]
-  :abba [1]]]
-
-
+    (pretty))

      (Trie/linearMatcher matchers)
      (first matchers))))

(defn pretty [{:keys [data children wilds catch-all]}]
  (into
    (if data [data] [])
    (mapcat (fn [[p n]] [p (pretty n)]) (concat children wilds catch-all))))

(defn lookup [^Trie$Matcher matcher path]
  (if-let [match ^Trie$Match (Trie/lookup matcher ^String path)]

  (Trie/scanner compiled-tries))

;;
;; spike
;;

(->
  [["/v2/whoami" 1]
   ["/v2/users/:user-id/datasets" 2]
   ["/v2/public/projects/:project-id/datasets" 3]
   ["/v1/public/topics/:topic" 4]
   ["/v1/users/:user-id/orgs/:org-id" 5]
   ["/v1/search/topics/:term" 6]
   ["/v1/users/:user-id/invitations" 7]
   ["/v1/users/:user-id/topics" 9]
   ["/v1/users/:user-id/bookmarks/followers" 10]
   ["/v2/datasets/:dataset-id" 11]
   ["/v1/orgs/:org-id/usage-stats" 12]
   ["/v1/orgs/:org-id/devices/:client-id" 13]
   ["/v1/messages/user/:user-id" 14]
   ["/v1/users/:user-id/devices" 15]
   ["/v1/public/users/:user-id" 16]
   ["/v1/orgs/:org-id/errors" 17]
   ["/v1/public/orgs/:org-id" 18]
   ["/v1/orgs/:org-id/invitations" 19]
   ["/v1/users/:user-id/device-errors" 22]
   ["/v2/login" 23]
   ["/v1/users/:user-id/usage-stats" 24]
   ["/v2/users/:user-id/devices" 25]
   ["/v1/users/:user-id/claim-device/:client-id" 26]
   ["/v2/public/projects/:project-id" 27]
   ["/v2/public/datasets/:dataset-id" 28]
   ["/v2/users/:user-id/topics/bulk" 29]
   ["/v1/messages/device/:client-id" 30]
   ["/v1/users/:user-id/owned-orgs" 31]
   ["/v1/topics/:topic" 32]
   ["/v1/users/:user-id/bookmark/:topic" 33]
   ["/v1/orgs/:org-id/members/:user-id" 34]
   ["/v1/users/:user-id/devices/:client-id" 35]
   ["/v1/users/:user-id" 36]
   ["/v1/orgs/:org-id/devices" 37]
   ["/v1/orgs/:org-id/members" 38]
   ["/v2/orgs/:org-id/topics" 40]
   ["/v1/whoami" 41]
   ["/v1/orgs/:org-id" 42]
   ["/v1/users/:user-id/api-key" 43]
   ["/v2/schemas" 44]
   ["/v2/users/:user-id/topics" 45]
   ["/v1/orgs/:org-id/confirm-membership/:token" 46]
   ["/v2/topics/:topic" 47]
   ["/v1/messages/topic/:topic" 48]
   ["/v1/users/:user-id/devices/:client-id/reset-password" 49]
   ["/v2/topics" 50]
   ["/v1/login" 51]
   ["/v1/users/:user-id/orgs" 52]
   ["/v2/public/messages/dataset/:dataset-id" 53]
   ["/v1/topics" 54]
   ["/v1/orgs" 55]
   ["/v1/users/:user-id/bookmarks" 56]
   ["/v1/orgs/:org-id/topics" 57]]
  (insert)
  (compile)
  (pretty))

(-> nil
    (insert "/kikka" 2)
