Skip to content

Instantly share code, notes, and snippets.

@mje113
Created June 4, 2014 13:41
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 mje113/fa708dcc48c3fa712336 to your computer and use it in GitHub Desktop.
Save mje113/fa708dcc48c3fa712336 to your computer and use it in GitHub Desktop.
func foobar() {
for i in 1...100 {
switch (i % 3, i % 5) {
case (0, 0): println("foobar")
case (0, _): println("foo")
case (_, 0): println("bar")
default: println("\(i)")
}
}
}
foobar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment