I often call methods that return an optional collection. I then iterate over
it. The problem is, it's a bit cumbersome to write:
if let container = someOptionalContainer
{
for item in container
{
}
}
I wish I could just write
for item in someOptionalContainer
{
}
such that if the optional is nil, it just skips the iteration altogether.
Is there a syntax for that (especially in Swift 3)?
--
Rick Mann
[email protected]
_______________________________________________
swift-users mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-users