Anonymous user
Variadic function: Difference between revisions
m
→{{header|Swift}}
(Add Nimrod) |
|||
Line 1,548:
Using <tt>...</tt> after the type of argument will take in any number of arguments and put them all in one array of the given type with the given name.
<lang swift>func printAll<T>(things: T...) {
// "things" is a
for i in things {
println(i)
|