retro.forth: smaller s:for-each

FossilOrigin-Name: 9e725bb5fcb79f2a246540427eb764711c4cdddfcca895c4780c929c5651a4d1
This commit is contained in:
crc 2020-02-25 13:19:31 +00:00
parent 080c6db3a4
commit 4370fd4011
3 changed files with 523 additions and 516 deletions

View file

@ -829,13 +829,21 @@ handle conversion of _ into spaces.
`s:for-each` executes a quote once for each cell in string. It is
a key part of building the other high-level string operations.
:s:for-each (sq-)
[ repeat
over fetch 0; drop
dup-pair
[ [ &fetch dip call ] dip ] dip
&n:inc dip
again
] call drop-pair ;
~~~
:s:for-each (sq-)
[ repeat
over fetch 0; drop
dup-pair
[ [ &fetch dip call ] dip ] dip
&n:inc dip
\puduposw \fezr.... drop
\puduposw \puduposw
\pupupufe \poca.... \poliadpo `1
again
] call drop-pair ;
~~~

BIN
ngaImage

Binary file not shown.

File diff suppressed because it is too large Load diff