Loops/Foreach: Difference between revisions
Content added Content deleted
m (→FOREACH) |
m (→FOREACH) |
||
Line 1,274: | Line 1,274: | ||
cells bounds do i @ . cell +loop ; \ 3 2 1</lang> |
cells bounds do i @ . cell +loop ; \ 3 2 1</lang> |
||
===FOREACH=== |
===FOREACH=== |
||
The thing about extensible languages is if you need FOREACH, you can have FOREACH. |
|||
The Forth ' operator returns the "execution token" (XT) of a Forth word. An XT can be run with EXECUTE. |
The Forth ' operator returns the "execution token" (XT) of a Forth word. An XT can be run with EXECUTE. |
||
If we apply an appropriate execution to all the elements of an array we have it. |
If we apply an appropriate execution to all the elements of an array we have it. |