Liking cljdoc? Tell your friends :D

hara.module.namespace.eval


eval-nsclj

(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
raw docstring

eval-temp-nsclj

(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
raw docstring

with-nscljmacro

(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
raw docstring

with-temp-nscljmacro

(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
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close