I want to write function that walk through array and return indexes where that element was found.
Something like:
extension Array {
func elementIndexes<T>() -> [Int] {
// if element is kind of class "T" add it to array [T] and then return
}
}
However, I have not succeeded. How can I do that?
[T]?