Swift's Optional has a take() function

After the introduction of Optional.toggle() back in 2018, I thought I had learned everything there is to Optional , but today I learned about another method: Optional.take() . As the documentation points out, it returns the value of a mutable optional (if not nil ) and then resets the variable to …