Given
func strBldArg(_ a: String) -> String {
a
}
func strBldNamedArg(a: String) -> String {
a
}
func strBld(_ body: () -> String) -> String {
body()
}
We have the following expansions:
let a: String = #html(div(strBldArg("a")))
"<div>\(strBldArg("a"))</div>" (good)
let b: String = #html(div(strBldNamedArg(a: "b")))
"<div>\(strBldNamedArg(a: "b"))</div>" (also good)
let c: String = #html(div(strBld{ "c" }))
"<div>\(strBld())</div>" (Oops! The closure is gone!)
let d: String = #html(div(strBld({ "d" })))
"<div>\(strBld({ "d" }))</div>" (Good 😃)