//
//  CollectionExtension.swift
//  SodaLive
//
//  Created by klaus on 12/8/24.
//

extension Collection {
    func mapIndexed<T>(_ transform: (Index, Element) -> T) -> [T] {
        return self.enumerated().map { index, element in
            transform(self.index(startIndex, offsetBy: index), element)
        }
    }
}
