参数类型 必须相同
func vari <T> (numbers:T...){
for i in numbers {
print(i)
}
}
vari(numbers: 4,2,3,4354,234)
vari(numbers: "3","dsff","ROROOROR","werwer")
print("=============")
vari(numbers: "3","dsff","ROROOROR","werwer")
log ========================================
4
2
3
4354
234
3
dsff
ROROOROR
werwer
=============
3
dsff
ROROOROR
werwer
网友评论