Jump to content

Named parameters: Difference between revisions

Add Factor named parameters.
(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}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.