towry
6/21/2017 - 3:27 PM

another_invariant_arg_example.swift

func test(a: Int...) {
    debugPrint(a)
}

test(a: 1, 2, 3, 4, 5, 6)
func test(a: [Int]) {
    debugPrint(a)
}

// a is an array now.
func test(a: Int...) {
    return test(a: a)
}

test(a: 3)