Created
June 11, 2014 15:03
-
-
Save intrepidmatt/f9295f2c9d4cf0efb031 to your computer and use it in GitHub Desktop.
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
| struct ArgumentList : Sequence { | |
| var arguments: String[] | |
| // init ... | |
| func generate() -> GeneratorOf<String> { | |
| var i = 0; | |
| return GeneratorOf<String>({ | |
| if (i > self.arguments.count) { | |
| return .None | |
| } else { | |
| return self.arguments[i++]; | |
| } | |
| }) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment