Push ns-records into user ns

This commit is contained in:
Tommi Reiman 2019-03-07 10:54:01 +02:00
parent 36634abd39
commit 72a0ad2a5b

View file

@ -300,7 +300,8 @@
(map-parameters keys)
(let [sym (gensym "PathParams")
ctor (symbol (str "map->" sym))]
(eval `(do (defrecord ~sym ~(mapv (comp symbol name) keys)) (~ctor {})))))))))
(binding [*ns* (find-ns 'user)]
(eval `(do (defrecord ~sym ~(mapv (comp symbol name) keys)) (~ctor {}))))))))))
(defn insert
"Returns a trie with routes added to it."