JanetDocsPlaygroundI'm feeling luckyGitHub sign in

eval



    function
    boot.janet on line 2546, column 1

    (eval form)

    Evaluates a form in the current environment. If more control over 
    the environment is needed, use `run-context`.


1 exampleSign in to add an example
Loading...
# Contrived example returning the variadic arguments passed in.
(defmacro example-macro [& args] ~(tuple ,;args))

(example-macro 1 2 3) # => (1 2 3)
(def args [1 2 3])

# `apply` is for functions, but there's always `eval`.
(assert (= (example-macro 1 2 3)
           (eval ~(example-macro ,;args))))
4kbytePlayground