Implemented over and cons
Fabio Cevasco h3rald@h3rald.com
Sun, 06 Apr 2025 21:10:53 +0200
1 files changed,
16 insertions(+),
0 deletions(-)
jump to
M
lib/utils.hex
→
lib/utils.hex
@@ -20,6 +20,22 @@ swap
if ) "unless" :: +;;; cons +;; a q1 -> q2 +;; Prepends %:a%% to %:q1%%. +( + swap quote swap cat +) "cons" :: + +;;; over +;; a1 a2 -> a1 a2 a1 +;; Copies the second item on the stack and pushes it on top +( + "_over_a" : + dup _over_a swap + "_over_a" # +) "ovar" :: + ;; isi ;; a -> i ;; Pushes %%0x1%% on the stack if %:a%% is an integer, %%0x0%% otherwise.