# HG changeset patch # User Steve Losh # Date 1758568501 14400 # Node ID f80c34ae28054886f786c047e5a2281905ff41c0 # Parent a26bbbf15587daa70245d44793acbd20e21227f9 Add over, rot diff -r a26bbbf15587 -r f80c34ae2805 src/base.lisp --- a/src/base.lisp Wed Mar 05 15:14:45 2025 -0500 +++ b/src/base.lisp Mon Sep 22 15:15:01 2025 -0400 @@ -196,6 +196,14 @@ "Duplicate `x`." (push! x x)) +(define-command (over o) (&read-only x y) + "Duplicate `x` (skipping `y`)." + (push! x)) + +(define-command (rot r) (x y z) + "Rotate `x y z` to `y z x`." + (push! y z x)) + (define-command pop () "Pop the top element of the stack." (pop!))