Skip to content

Instantly share code, notes, and snippets.

@es-kumagai
Created January 27, 2023 16:48
Show Gist options
  • Save es-kumagai/77952cc194bbde0e5613c96898dbefc2 to your computer and use it in GitHub Desktop.
Save es-kumagai/77952cc194bbde0e5613c96898dbefc2 to your computer and use it in GitHub Desktop.
while let shorthand ⋯ #CodePiece
var values = [1, 2, 3, 4, 5]
var value: Int? { values.popLast() }
while let value {
print(value)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment