From SE-0293 - Closure:
For closures that take in a projected value, the property-wrapper attribute is not necessary if the backing property wrapper and the projected value have the same type, such as the
@ Binding
I think I understand now: Binding<Value>
's projectedValue
is also Binding<Value>
. So since ForEach.init
content
closure parameter is a Binding<Value>
, its projectedValue is also Binding<Value>
, which makes $user
means take the parameter's projectedValue to initialize the closure parameter with .init(projectedValue:)
.