Array vs some Collection
Here’s the code if you want to experiment with it!
import Foundation
struct User {
let firstName: String
}
func display(users: some Collection<User>) {
for user in users {
print(user)
}
}
Here’s the code if you want to experiment with it!
import Foundation
struct User {
let firstName: String
}
func display(users: some Collection<User>) {
for user in users {
print(user)
}
}