All pastes #943935 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-15 18:39 UTC
rendered paste body
Syntax: Anything seperated by whitespace.

Data type: A quotation. A program, in [...]. They can be nested. However,
they may not actually appear in the program text.

Semantics: The program has an [] in front of it (which, of course,
could not actually appear in the program) and then these rewrite rules are
applied to it, left-to-right.

There is, however, one special case: `X dei` becomes `X [X]`, but this happens
before X is executed. So: `dup dei` is `dup [dup]`.

[X] wrap                => [[X]]
X drop                  =>
X dup                   => X X
X Y swap                => Y X
[X] i                   => X
[X] [Y] compose         => [X Y]