seq.reduce(into:_:)
// declaration
func reduce<Result>(
into initialResult: Result,
_ updateAccumulatingResult: (
_ partialResult: inout Result, // โญ๏ธ inout parameter
Self.Element
) throws -> () // โญ๏ธ no return value
) rethrows -> Result
Last updated