More details here, in Swift Programming language (functions & closures):
« A closure passed as the last argument to a function can appear immediately after the parentheses. When a closure is the only argument to a function, you can omit the parentheses entirely. »
The Swift Programming Language (Swift 5.7)
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: