Last active
August 29, 2015 14:23
-
-
Save narfdotpl/404073078a35eb2822e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Fooable { | |
var foo: String { get } | |
} | |
extension Fooable { | |
var foo: String { | |
return "foo" | |
} | |
} | |
extension Int: Fooable {} | |
extension SequenceType where Self.Generator.Element: Fooable { | |
var foo: String { | |
return "bar" | |
} | |
} | |
print(1.foo) | |
print([1, 2, 3].foo) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment