It's vary useful to transform some Optional value to a view that display the value:
anOptional.map { SomeView($0) }
If anOptional
is nil
, it's as-if nothing there.
It's vary useful to transform some Optional value to a view that display the value:
anOptional.map { SomeView($0) }
If anOptional
is nil
, it's as-if nothing there.