Skip to content

Instantly share code, notes, and snippets.

@surakamy
Last active December 4, 2016 13:51
Show Gist options
  • Save surakamy/934fdf59fe189dba23442572b9b78042 to your computer and use it in GitHub Desktop.
Save surakamy/934fdf59fe189dba23442572b9b78042 to your computer and use it in GitHub Desktop.
Swift generic typealias
typealias Closure<I, O> = (I) -> O
let lambda: Closure<Int, String> = { intValue in
return "\(intValue) * \(intValue) = \(intValue*intValue)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment