> 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?
The grammar says a function returns this: attributes-opt type A type is type → array-type dictionary-type function-type type-identifier tuple-type optional-type implicitly-unwrapped-optional-type protocol-composition-type metatype-type A strict reading of the grammar says that a tuple-type is only one of the many types that can be returned. Also, (Int) and Int can be used interchangeably because the type of (Int) is not a tuple (according to the book). It is an Int. (Type) seems to be magic syntax. _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to [email protected]
