What does the expression () -> () = {} mean in Swift?

Viewed 85

I'm going over some Swift code and I've encounter this function signature:

func foo(withCompletion completion: @escaping () -> () = {}) { ... }

I'm not sure what does the part () -> () = {} mean? And if it's a default value, how should it be used?

Any idea?

The code is in Swift 3

1 Answers
Related