Swift 4の新しいreduceが素晴らしいので紹介する - Qiita

これまでの reduce は次のようなシグネチャでした。func reduce<T>(_ initial: T, _ combine: (T, Element) throws -> T) reth…