Liking cljdoc? Tell your friends :D
Mostly clj/s.
Exceptions indicated.

hara.namespace.eval


eval-nsclj

(eval-ns ns forms)

Evaluates a list of forms in an existing namespace (eval-ns 'hara.common.checks '[(long? 1)]) => true

Evaluates a list of forms in an existing namespace
(eval-ns 'hara.common.checks
              '[(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-nsclj/smacro

(with-ns ns & forms)

Evaluates body forms in an existing namespace given by ns.

(require '[hara.common.checks]) (with-ns 'hara.common.checks (long? 1)) => true

Evaluates `body` forms in an existing namespace given by `ns`.

(require '[hara.common.checks])
(with-ns 'hara.common.checks
  (long? 1)) => true
raw docstring

with-temp-nsclj/smacro

(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