Skip to content

Instantly share code, notes, and snippets.

@OneSadCookie
Last active November 12, 2015 01:22
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 OneSadCookie/1e84e3dcc2df3c4917e4 to your computer and use it in GitHub Desktop.
Save OneSadCookie/1e84e3dcc2df3c4917e4 to your computer and use it in GitHub Desktop.
func computeValue() -> Int {
return 3
}
let x: Int = {
switch computeValue() {
case 0:
return 1
case let value:
return value
}
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment