Reducing a Sequence of Elements in Swift
If you need to create a single value from a sequence of elements, then the reduce(::) method is the API you are looking for. In this episode of Swift Fundamentals, we take a look at Swift's reduce(::) method. You learn about its syntax and when you shouldn't use it.
in Foundation