扩展数组数组
Swift 4.1,Xcode 9.3
我该如何在Swift中扩展Array<Array>
?
extension Array where Element == Array { //This is where the error occurs
someMethod()
}
此外,我想扩展一个特定类型的数组的数组,例如:
extension Array where Element == Array<Int> { //Can I even do this?
someOtherMethod()
}
Thanks in advance for your help!
func filterWithId<T where T : Idable>() -> [T] { }
函数。 - a.masri