- Reactive Programming with Swift 4
- Navdeep Singh
- 77字
- 2025-04-04 17:21:12
Differentiating between single-tuple and multiple-argument function types
f: (Void) -> ()
When using f: (Void) -> () for the type of a function argument, it is generally meant to be f: () -> (), so the migrator will suggest that you use this type instead. Otherwise, with the new rules in SE-0110 for Swift 4, you will need to call the f function as f(()).
To read more about the Swift proposals, you can visit https://Apple.github.io/swift-evolution/.