>>133
It's a stack-based language, and it's entirely dynamic, so e.g. defining a function expects the name and body of the function to be on the stack.
So that makes a lot of normal code constructs need you to write "backwards" (e.g. [6] "test" string->symbol define
instead of the more normal-looking define test [6]
to define test
as a function that just pushes a 6 to the stack).
So I added quote
, which just reads in the very next thing and puts it on the stack without trying to interpret it as a function reference, and uplevel
, which basically interprets the thing on top of the stack in its caller's context. This means that you can e.g. define a function that outlives the context in which it was defined.
Thus, in order to get sensible-looking syntax like if
, while
, define
, whatever, you define it yourself, and quote
and uplevel
are a minimal way of doing so.