all repos — hex @ b389ca018fe6ed4ed28057e1705baec630f075c7

A tiny, minimalist, slightly-esoteric concatenative programming lannguage.

Implemented pop
Fabio Cevasco h3rald@h3rald.com
Mon, 07 Apr 2025 23:03:07 +0200
commit

b389ca018fe6ed4ed28057e1705baec630f075c7

parent

15fe49afa483719c2fc0644f21e01a0d32b166b1

1 files changed, 19 insertions(+), 0 deletions(-)

jump to
M lib/utils.hexlib/utils.hex

@@ -27,6 +27,25 @@ (

' cat ) "push" :: +;;; pop +;; q1 -> q2 +;; Removes the last item at the end of %:q1%%. +( + "_pop_q" : + () "_pop_res" : + 0x0 "_pop_c" : + (_pop_c _pop_q len 1 - <) + ( + _pop_res _pop_q _pop_c get push "_pop_res" : + _pop_c 0x1 + "_pop_c" : + ) + while + _pop_res + "_pop_q" # + "_pop_res" # + "_pop_c" # +) "pop" + ;;; cons ;; a q1 -> q2 ;; Prepends %:a%% to the beginning of %:q1%%.