About differentiating async/non-async versions of a function by name

...Ah, OK, the code below gives the error "Ambiguous use of 'forEach'" at the line with [1,2,3].forEach { n in show(n) }, so the does not know which forEach to take if no await is used in the call. Compare this to this example: declarating somethin async means that it you might use an async or non-async thing at that place. The compiler is not able to differentiate between the too.

In the previous example above the codes used throws and this helped the comoiler to differentiate.

public extension Sequence {
    
    func forEach (
        _ operation: (Element) async -> Void
    ) async {
        for element in self {
            await operation(element)
        }
    }
    
}

@main
struct App {
    static func main() async {
        
        func show(_ n: Int) {
            print(n)
        }
        
        func showAsync(_ n: Int) async {
            print(n)
        }
        
        func showAsyncThrowing(_ n: Int) async throws {
            print(n)
        }
    
        [1,2,3].forEach { n in show(n) }
        await [1,2,3].forEach { n in await showAsync(n) }
        
    }
}