Post

Replies

Boosts

Views

Activity

Comment on Collection and Index error on Xcode 16
What i do was: import Foundation extension RandomAccessCollection { func get(at i: Int) -> Element? { guard i >= 0, i < count else { return nil } // calculate the collection's index by offsetting from the start index let collectionIndex = index(startIndex, offsetBy: i) return self[collectionIndex] } } What do you think? Thanks.
Sep ’24