v0.3.6: map, filter, a lot of fixes

This commit is contained in:
Luxferre
2026-07-10 09:51:29 +03:00
parent 7b30ddacbd
commit 6c3a48d796
7 changed files with 54 additions and 7 deletions
+2
View File
@@ -57,3 +57,5 @@
:: qfor [ dup qlen while [ uncons drop [ [] cons cons ] dip swap dup 0 qget dip uncons drop swap 0 qget dup qlen ] drop drop ]
:: for [ next next [ i ] dip swap qfor ]
:: allot [ [0] swap * ]
:: map [ swap [] rot isq not if [ [] cons ] [] [ swap cons ] lcat rot qfor rev ]
:: filter [ swap [] rot isq not if [ [] cons ] [] dup [ dup isq if [ qlen 1 - qget ] [] ] dip swap dup [ isnum ] 0 qget streq swap dup [ isstr ] 0 qget streq swap [ isq ] 0 qget streq or or if [ [ nip if [ swap cons ] [ drop ] ] ] [ [ if [ swap cons ] [ drop ] ] ] [ [ dup ] swap lcat ] dip lcat rot qfor rev ]