Call a function: Difference between revisions

m
→‎{{header|Factor}}: change a few words for accuracy
m (→‎{{header|Factor}}: change a few words for accuracy)
Line 1,523:
* Factor makes no distinction between subroutines and functions.
 
* It's not perfectly accurate to think of words as passing arguments by reference (or at all), since all words simply operate on the data stack. However, it is still important for the programmer to understand that words which make duplicates of objects such as <tt>dup</tt> and <tt>over</tt> do so by creatingcopying references. If one wishes for a uniqueshallow copy of a non-immediate object, one may use <tt>clone</tt>.
 
* Partial application is possible by use of curry. Here, the object 2 is curried into the left side of the quotation (anonymous function) <tt>[ - ]</tt>:
1,808

edits