aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/stack.nim1
-rw-r--r--src/stackStack.nim6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/stack.nim b/src/stack.nim
index eeef5cd..9ba3e24 100644
--- a/src/stack.nim
+++ b/src/stack.nim
@@ -73,6 +73,7 @@ func Transfert*(toss: var Stack, soss: var Stack, n: int) =
soss.height = 0
func Discard*(s: var Stack, n: int) =
+ ## Implements a discard mechanism intended for use with the '}'(aka end) stackstack command
s.height -= n
if s.height < 0:
s.height = 0
diff --git a/src/stackStack.nim b/src/stackStack.nim
index 6d32c87..1bc89c0 100644
--- a/src/stackStack.nim
+++ b/src/stackStack.nim
@@ -25,6 +25,12 @@ func PushVector*(ss: var StackStack, v: tuple[x, y: int]) =
func Clear*(ss: var StackStack) =
ss.head[].Clear()
+func Duplicate*(ss: var StackStack) =
+ ss.head[].Duplicate()
+
+func Swap*(ss: var StackStack) =
+ ss.head[].Swap()
+
func Begin*(ss: var StackStack, v: tuple[x, y: int]) =
inc ss.height
let soss = ss.head