It is a closure which takes TypeA and returns TypeB.

Thanks,
Jon

> On Jul 2, 2015, at 1:29 PM, Rick Mann <rm...@latencyzero.com> wrote:
> 
> I saw this in a Swift HTTP server:
> 
>    typealias Handler = HttpRequest -> HttpResponse
> 
> You can see the whole thing here:
> 
>       https://github.com/glock45/swifter/blob/master/Common/HttpServer.swift
> 
> I can write in-line handlers for this, but I'm trying to write a separate 
> method, and just assign the method as a handler, and I can't seem to get the 
> signature right. Is it the same as this?
> 
>       func myHandler(req : HttpRequest) -> HttpResponse
> 
> 
> Thanks.
> 
> -- 
> Rick Mann
> rm...@latencyzero.com
> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/jhull%40gbis.com
> 
> This email sent to jh...@gbis.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to