all repos — hex @ ebb8b5ee51af610882bd13e3ce90dd68e404c6f5

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

Implemented each
h3rald h3rald@h3rald.com
Sun, 22 Dec 2024 20:36:22 +0100
commit

ebb8b5ee51af610882bd13e3ce90dd68e404c6f5

parent

47ac02c34cd9d55db767a7717056e0685247f56b

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

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

@@ -275,3 +275,19 @@

;;; each ;; q1 q2 -> * ;; Applies %%q2%% to each element of %%q1%%. +( + "_fn" : + "_list" : + (_fn isq _list isq and) + ("[symbol each] Two quotations required" fail) + when + _list len "_len" : + 0x0 "_c" : + (_c len <) + (_list _c get _fn .) + while + "_fn" # + "_list" # + "_len" # + "_c" # +) "each" ::