• 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
What is "TypeA -> TypeB"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What is "TypeA -> TypeB"?


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

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
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


  • Follow-Ups:
    • Re: What is "TypeA -> TypeB"?
      • From: Marco S Hyman <email@hidden>
    • Re: What is "TypeA -> TypeB"?
      • From: Jonathan Hull <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: Issues with hiding NSTableColumns with autolayout
  • Next by thread: Re: What is "TypeA -> TypeB"?
  • Index(es):
    • Date
    • Thread