(eval-ns ns forms)
Evaluates a list of forms in an existing namespace (eval-ns 'hara.core.base.check '[(long? 1)]) => true
Evaluates a list of forms in an existing namespace (eval-ns 'hara.core.base.check '[(long? 1)]) => true
(eval-temp-ns forms)
Evaluates a list of forms in a temporary namespace (eval-temp-ns '[(def inc1 inc) (defn inc2 [x] (+ 1 x)) (-> 1 inc1 inc2)]) => 3
"All created vars will be destroyed after evaluation."
(resolve 'inc1) => nil
Evaluates a list of forms in a temporary namespace (eval-temp-ns '[(def inc1 inc) (defn inc2 [x] (+ 1 x)) (-> 1 inc1 inc2)]) => 3 "All created vars will be destroyed after evaluation." (resolve 'inc1) => nil
(with-ns ns & forms)
Evaluates body
forms in an existing namespace given by ns
.
(require '[hara.core.base.check]) (with-ns 'hara.core.base.check (long? 1)) => true
Evaluates `body` forms in an existing namespace given by `ns`. (require '[hara.core.base.check]) (with-ns 'hara.core.base.check (long? 1)) => true
(with-temp-ns & forms)
Evaluates body
forms in a temporary namespace.
(with-temp-ns (def inc1 inc) (defn inc2 [x] (+ 1 x)) (-> 1 inc1 inc2)) => 3
"All created vars will be destroyed after evaluation."
(resolve 'inc1) => nil
Evaluates `body` forms in a temporary namespace. (with-temp-ns (def inc1 inc) (defn inc2 [x] (+ 1 x)) (-> 1 inc1 inc2)) => 3 "All created vars will be destroyed after evaluation." (resolve 'inc1) => nil
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close