Higher-order functions: Difference between revisions

m
Line 1,569:
 
If you add # before a function or method name you push the function object on the stack (instead of performing the function). This allows to pass functions to other functions, as for any other object.
Here we pass #++ to method map :
<lang Oforth>[1, 2, 3, 4, 5 ] map(#++)</lang>
 
1,015

edits