Loops/Foreach: Difference between revisions
Content added Content deleted
m (→FOREACH) |
m (→FOREACH) |
||
Line 1,276: | Line 1,276: | ||
The thing about extensible languages is if you need FOREACH, you can have 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 |
If we apply an appropriate XT to all the elements of an array we have it. |
||
<lang forth>: FOREACH ( array size XT --) |
<lang forth>: FOREACH ( array size XT --) |