News for hackers. Stuff that matters.
Re:What’s New in Swift 5.2 by rudedogg on Thursday February 06, 2020 @03:35PM (#22260008)
The example you didn't cover using AdditiveArithmetic is actually covered in the docs here: https://developer.apple.com/documentation/swift/additivearit...

    extension Sequence where Element: AdditiveArithmetic {
        func sum() -> Element {
            return reduce(.zero, +)
        }
    }

There are no comments on this comment yet.