Variadic function: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
imported>Arakov
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 3,183:
=={{header|Wren}}==
Wren doesn't support variadic functions and doesn't really need to as we can just write a function which takes one (or one more) argument and pass it a list.
<syntaxhighlight lang="ecmascriptwren">var printArgs = Fn.new { |args| args.each { |arg| System.print(arg) } }
 
printArgs.call(["Mary", "had", "3", "little", "lambs"])</syntaxhighlight>
9,476

edits