Skip to content

Instantly share code, notes, and snippets.

@chriseidhof
Created August 10, 2015 12:56
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 chriseidhof/bbb144238baf1c01f785 to your computer and use it in GitHub Desktop.
Save chriseidhof/bbb144238baf1c01f785 to your computer and use it in GitHub Desktop.
import Foundation
var generator = [1,2,3].generate()
while let i = generator.next() {
print(i)
}
let i = 5
if case 0..<10 = i {
print("\(i) within range")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment