Swift Question: Tuple Return Types
Swift Question: Tuple Return Types
- Subject: Swift Question: Tuple Return Types
- From: Mike Ellard <email@hidden>
- Date: Thu, 26 Feb 2015 13:24:56 -0800
Functions / Methods / Closures that return more than one item can use a tuple to do so.
Functions / Methods / Closures that return zero items use an empty tuple to do so, notated as () or Void.
A tuple that contains a single item is treated as having the type of the item it contains. For example, (Int) and Int can be used interchangeably.
So here’s my question: Is it correct to say that every function / method / closure returns some sort of tuple, including functions / methods / closures that return a single item?
Sincerely,
Michael Patrick Ellard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden