Avatar
@swift-5.2.5 protocol CallAsFunction { func callAsFunction() } struct Foo: CallAsFunction { func callAsFunction() { print("foo") } } func call<C: CallAsFunction>(_ caller: C) { caller() } call(Foo())