Currying: Difference between revisions

Content added Content deleted
Line 1,666: Line 1,666:
=={{header|Quackery}}==
=={{header|Quackery}}==


Quackery does not have a currying function, but is is easily defined.
Quackery does not have a currying function, but one is easily defined.


The word <code>curried</code> in the definition below curries the word following it, (which should act on two arguments on the stack), with the argument on the top of the stack. In the shell dialogue in the '''output:''' section the word <code>+</code> is combined with the number <code>5</code> on the top of stack to create the curried lambda nest <code>[ ' 5 + ]</code> which will add 5 the number on the top of stack when it is evaluated with <code>do</code>.
The word <code>curried</code> in the definition below curries the word following it, (which should act on two arguments on the stack), with the argument on the top of the stack. In the shell dialogue in the '''output:''' section the word <code>+</code> is combined with the number <code>5</code> on the top of stack to create the curried lambda nest <code>[ ' 5 + ]</code> which will add 5 the number on the top of stack when it is evaluated with <code>do</code>.