Skip to content

Instantly share code, notes, and snippets.

@kongtomorrow
Created June 21, 2015 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kongtomorrow/7054ba8094fde4319c43 to your computer and use it in GitHub Desktop.
Save kongtomorrow/7054ba8094fde4319c43 to your computer and use it in GitHub Desktop.
protocol Value {
}
protocol Smashable {
typealias V : Value
func valueBySmashing​OtherValue​(value: V) -> V
}
struct Bar : Value {
}
struct Foo : Value {
func valueBySmashing​OtherValue​<OtherV : Value>(value: OtherV) -> Bar {
return Bar()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment