Documenting stack module; removed take symbol.
h3rald h3rald@h3rald.com
Sun, 26 Mar 2017 21:47:15 +0200
2 files changed,
6 insertions(+),
6 deletions(-)
M
lib/min_stack.nim
→
lib/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_.md
→
site/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}}.#}