Jump to content

Loops/Foreach: Difference between revisions

m
Line 1,276:
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.
If we apply an appropriate executionXT to all the elements of an array we have it.
 
<lang forth>: FOREACH ( array size XT --)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.