Function definition: Difference between revisions
→{{header|langur}}
(→{{header|BASIC}}: Added ANSI BASIC.) |
Langurmonkey (talk | contribs) |
||
Line 2,190:
Parameters are defined within parentheses after the fn token. To specify no parameters, use an empty set of parentheses.
<syntaxhighlight lang="langur">val .multiply = fn(.x, .y) { .x * .y }
.multiply(3, 4)</syntaxhighlight>
|