all repos — min @ 7d9bd073a1ce4aceabce8d321b9e210675d18b68

A small but practical concatenative programming language.

site/contents/_includes/_reference-stack_.md

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
{@ _defs_.md || 0 @}

{#op||dip||2 (1)||1 2||
Removes the first and second element from the stack, unquotes the first element, and restores the second element.#}

{#op||dup||1||1 1||
Duplicates the first element on the stack.#}

{#op||dupd||2 1||2 2 1||
Duplicates the second element on the stack.#}

{#op||id||{{null}}||{{null}}||
Does nothing.#}

{#op||k||(2) (1)||1||
K combinator; removes the second element from the stack and unquotes the first element on the stack.#}

{#op||newstack||{{null}}||{{null}}||
Empties the stack.#}

{#op||pop||\*||{{null}}||
Removes the first element from the stack.#}

{#op||popd||2 1||1||
Removes the second element from the stack.#}

{#op||popop||2 1||{{null}}||
Removes the first two elements from the stack.#}

{#op||stack||{{null}}||(\*)||
Returns a quotation containing the contents of the stack.#}

{#op||unstack||(\*)||\*?||
Substitute the existing stack with the contents of {{q}}.#}

{#op||w||(2) (1)||(2) (2) 1||
W combinator; duplicates the second element from the stack and unquotes the first element on the stack.#}