Liking cljdoc? Tell your friends :D
Clojure only.

meme.tools.run

Generic eval pipeline: source → parse → expand → eval. Language-agnostic. All language-specific behavior is injected via opts: :run-fn — (fn [source opts] → ctx-with-:forms) :expand-forms — (fn [forms opts] → expanded-forms) :eval — eval function (default: clojure.core/eval) :prelude — vector of forms to eval before user code JVM/Babashka only.

Generic eval pipeline: source → parse → expand → eval.
Language-agnostic. All language-specific behavior is injected via opts:
  :run-fn       — (fn [source opts] → ctx-with-:forms)
  :expand-forms — (fn [forms opts] → expanded-forms)
  :eval         — eval function (default: clojure.core/eval)
  :prelude      — vector of forms to eval before user code
JVM/Babashka only.
raw docstring

run-fileclj

(run-file path opts)
(run-file path opts resolve-run-fn)

Read and eval a file. Returns the last result. resolve-run-fn: optional (fn [path opts] → run-fn-or-nil) for lang dispatch. Falls back to run-string with the provided opts.

Read and eval a file. Returns the last result.
resolve-run-fn: optional (fn [path opts] → run-fn-or-nil) for lang dispatch.
Falls back to run-string with the provided opts.
sourceraw docstring

run-stringclj

(run-string s opts)

Parse source string, eval each form, return the last result. opts: :run-fn — (fn [source opts] → {:forms [...]}) — REQUIRED :expand-forms — (fn [forms opts] → expanded-forms) — REQUIRED :reader-opts — opts map passed to run-fn :eval — eval fn (default: eval) :prelude — vector of forms to eval before user code

Parse source string, eval each form, return the last result.
opts:
  :run-fn        — (fn [source opts] → {:forms [...]}) — REQUIRED
  :expand-forms  — (fn [forms opts] → expanded-forms) — REQUIRED
  :reader-opts   — opts map passed to run-fn
  :eval          — eval fn (default: eval)
  :prelude       — vector of forms to eval before user code
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close