all repos — min @ 03d1979ce43ee7c9dbeab17585c4cd487853ce18

A small but practical concatenative programming language.

Documenting stack module; removed take symbol.
h3rald h3rald@h3rald.com
Sun, 26 Mar 2017 21:47:15 +0200
commit

03d1979ce43ee7c9dbeab17585c4cd487853ce18

parent

e90abf3af17b89eaec37675f5965e6a08c0416d0

2 files changed, 6 insertions(+), 6 deletions(-)

jump to
M lib/min_stack.nimlib/min_stack.nim

@@ -70,12 +70,6 @@ let v = i.pop

i.unquote(q) i.push v - # ((dip) cons cons) - .symbol("take") do (i: In): - i.push newVal(@["dip".newSym], i.scope) - i.push "cons".newSym - i.push "cons".newSym - .symbol("swap") do (i: In): if i.stack.len < 2: raiseEmptyStack()
M site/contents/_includes/_reference-stack_.mdsite/contents/_includes/_reference-stack_.md

@@ -27,8 +27,14 @@

{#op||popop||2 1||{{null}}|| Removes the first two elements from the stack.#} +{#op||rollup||3 2 1||1 2 3|| + Moves the third and second element into second and third position and moves the first element into third position.#} + {#op||stack||{{null}}||(\*)|| Returns a quotation containing the contents of the stack.#} + +{#op||swap||2 1||1 2|| +Swaps the first two elements on the stack. #} {#op||unstack||(\*)||\*?|| Substitute the existing stack with the contents of {{q}}.#}