You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of BinaryInteger/negated() is often assigned to self so having a mutating convenience for it might be nice.
x.negate().discard()// with wrapping behavior
x.negate().unchecked("this can't fail because...")
extensionBinaryInteger{/// Forms the additive inverse of `self` and an `error` indicator.@inlinablepublicmutatingfunc negate()->Fallible<Void>{leterror:Bool(self, error)=self.negated().components()returnFallible(Void(), error: error)}}
The text was updated successfully, but these errors were encountered:
I don't want too many mutating conveniences but I think negate() is in the same class as toggle(), mainly because a binary integer negate() is a fallible sign.toggle() in sign-and-magnitude algorithms.
The result of
BinaryInteger/negated()
is often assigned toself
so having amutating
convenience for it might be nice.The text was updated successfully, but these errors were encountered: