Skip to content

macro eval

Turtle Kitty edited this page Jan 29, 2016 · 1 revision

macro-eval

This allows the programmer to define variables and procedures for use by macros during compile time. The things so defined will disappear before runtime.

(def foo 1)
(proc bar (x) (+ x 10))

(macro baz ()
    (... foo or bar ...)) -> ERROR

(macro-eval
    (def foo 1)
    (proc bar (x) (+ x 10)))

(macro baz ()
    (... foo or bar ...)) -> Ok!
Clone this wiki locally