In tutorials for Swift on Linux, the following code is given:
var arr = ["one", "two", "three"]
for (i,v) in arr.enumerated() {
print("\(i) \(v)")
}
Doing a search on Apple’s Swift documentation also returns enumerated() as the method name
https://developer.apple.com/documentation/swift/array/1687832-enumerated
=================================
However, in Silver, the code that works is:
var arr = ["one", "two", "three"]
for (i,v) in arr.enumerate() {
print("\(i) \(v)")
}
as per the Swift Base Library documentation:
Is there a good reason for the difference in naming/spelling?