The @discardableResult Attribute in Swift

Swift has several small features as a language, many of them being neglected quite often while they consist of small programming gems. One of them is the attribute that everybody wish they knew from the beginning.

What’s the purpose of ? Put in simple words, when used to annotate a method, then the returned value of the method can be ignored when it gets