The second overload here is obsolete.
protocol P { }
func ƒ(_: some P) { }
func ƒ(_: any P) { }
But this second one is not. We can nearly write the same code for overloads that different only by any
and some
. What should we be doing? Code generation?
func ƒ(_ parameter: some Sequence<some P>) {
parameter.forEach(ƒ)
}
func ƒ(_ parameter: some Sequence<any P>) {
parameter.forEach { ƒ($0) }
}