Last active
October 25, 2019 05:11
-
-
Save aromal-sasidharan/b9a078e9325b801885871872ab4dd312 to your computer and use it in GitHub Desktop.
Param grouping using tuple in swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func passParam(student: (name: String, address: String, rollNo: String)?, param: (param3: String, param4: String, param5: String, param6: String)?) { | |
print("student is") | |
print(student ?? "Nodata") | |
print("param is") | |
print(param ?? "Nodata") | |
print("param 6") | |
print(param?.param6 ?? "Noname") | |
} | |
let student = ("aromal","xyx", "1223") | |
let param = ( | |
param6:"aromal", | |
param5: "xyx", | |
param4: "1223", | |
param3: "xyz") | |
passParam(student: student, param: param) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment