Jump to content

Function definition: Difference between revisions

→‎{{header|langur}}: added operator implied functions
(→‎{{header|langur}}: added operator implied functions)
Line 1,507:
Parameters are implied when the f token is not immediately followed by parentheses without spacing. The implied order of implied parameters is based on the string sort order of their names, not their order within the function.
<lang langur>val .multiply = f .x x .y
.multiply(3, 4)</lang>
 
=== operator implied functions ===
Operator implied functions are built using an infix operator between curly braces on an f token.
 
{{works with|langur|0.6.6}}
<lang langur>val .multiply = f{x}
.multiply(3, 4)</lang>
 
1,007

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.