• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What is "TypeA -> TypeB"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is "TypeA -> TypeB"?


  • Subject: Re: What is "TypeA -> TypeB"?
  • From: Rick Mann <email@hidden>
  • Date: Thu, 02 Jul 2015 14:50:44 -0700

> On Jul 2, 2015, at 14:41 , Quincey Morris <email@hidden> wrote:
>
> On Jul 2, 2015, at 13:54 , Rick Mann <email@hidden> wrote:
>>
>>> On Jul 2, 2015, at 13:51 , Jonathan Hull <email@hidden> wrote:
>>>
>>> It is a closure which takes TypeA and returns TypeB.
>>
>> I thought those were written as this:
>>
>> 	(TypeA) -> TypeB
>>
>> With parentheses around the parameter list.
>
> A 1-tuple is the same thing as the value it encloses, and parameter lists have the syntax of a tuple. However, if you also specify a parameter name:
>
> 	(type: TypeA) -> TypeB
>
> presumably because the operators wouldn’t associate in the correct order otherwise.

Awesome, thanks for the clarification. I've written feedback on the Swift Closure docs to mention that.


--
Rick Mann
email@hidden



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >What is "TypeA -> TypeB"? (From: Rick Mann <email@hidden>)
 >Re: What is "TypeA -> TypeB"? (From: Jonathan Hull <email@hidden>)
 >Re: What is "TypeA -> TypeB"? (From: Rick Mann <email@hidden>)
 >Re: What is "TypeA -> TypeB"? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Problem having a framework working in one of my targets (a screensaver)
  • Next by Date: Re: What is "TypeA -> TypeB"?
  • Previous by thread: Re: What is "TypeA -> TypeB"?
  • Next by thread: Re: What is "TypeA -> TypeB"?
  • Index(es):
    • Date
    • Thread