Created
July 7, 2016 03:42
-
-
Save STAR-ZERO/2d29eec45570b9f638884c50bd04c790 to your computer and use it in GitHub Desktop.
Swiftでfor inに対応させる
This file contains hidden or 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
class Test: SequenceType { | |
typealias Generator = IndexingGenerator<[String]> | |
func generate() -> Generator { | |
return ["A", "B", "C"].generate() | |
} | |
} | |
let test = Test() | |
for t in test { | |
print(t) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment