by Franck » 29 Aug 2018 13:33
In fact, some HOFs (which means Higher Order Functions, ie functions that take other functions as parameter or as return value) exist in Forth.
For instance :
- EXECUTE (an HOF that executes the xt sent as parameter).
- FIND
- CATCH
- TRAVERSE-WORDLIST
And it is possible to create new HOF.
But what make HOF really powerfull (and Forth does not have them as built-in features) are collections (Arrays, ...).
Also, blocks (or quotations in Forth) are very usefull to use HOF efficienlty and to not pollute the dictionary.
Franck