f80c34ae2805 default tip
Add over, rot
| author | Steve Losh <steve@stevelosh.com> | 
|---|---|
| date | Mon, 22 Sep 2025 15:15:01 -0400 | 
| parents | a26bbbf15587 | 
| children | (none) | 
| branches/tags | default tip | 
| files | src/base.lisp | 
Changes
--- 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!))