Anonymous user
Named parameters: Difference between revisions
Add Factor named parameters.
SqrtNegInf (talk | contribs) |
(Add Factor named parameters.) |
||
Line 427:
? printName(["first" => "John", "last" => "Doe"])
Doe, John</lang>
=={{header|Factor}}==
Named parameters in Factor are as simple as changing the <code>:</code> word to <code>::</code> and using the variables defined in the stack effect declaration.
<lang Factor>
:: my-named-params ( a b -- c ) a b * ;
</lang>
=={{header|Forth}}==
|