func foo<T>(_ f: T) { print(1) } func foo<T>(_ f: () -> T, opt: Int = 1) { print(2) } func bar() -> Int { 1 } foo(bar)