Function definition: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
imported>Joeypas
(Added section for ziglang)
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 3,491:
The following 'multiply' function will work for any type(s) that support the '*' operator.
However, it will produce a runtime error otherwise, as demonstrated by the final example.
<syntaxhighlight lang="ecmascriptwren">var multiply = Fn.new { |a, b| a * b }
 
System.print(multiply.call(3, 7))
9,476

edits