Skip to content

[stdlib] Add take to Optional#38847

Closed
Azoy wants to merge 1 commit into
swiftlang:mainfrom
Azoy:thats-a-hot-take
Closed

[stdlib] Add take to Optional#38847
Azoy wants to merge 1 commit into
swiftlang:mainfrom
Azoy:thats-a-hot-take

Conversation

@Azoy
Copy link
Copy Markdown
Contributor

@Azoy Azoy commented Aug 11, 2021

Adds a simple take operation on Optional.

var x: Int? = 128

if let x = x.take() {
  print(x) // 128
}

print(x) // nil

@Azoy Azoy added the swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review label Aug 11, 2021
@Azoy Azoy closed this Feb 15, 2024
@Azoy Azoy deleted the thats-a-hot-take branch February 15, 2024 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant