[swift-evolution] For... else

Félix Cloutier felixcca at yahoo.ca
Fri Jan 22 19:59:47 CST 2016


I frequently need something like that and I'd like to have it in Swift too.

Félix

> Le 22 janv. 2016 à 13:22:45, Ben Langmuir via swift-evolution <swift-evolution at swift.org> a écrit :
> 
> Previous discussion here:
> https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001110.html
> 
> 
>> On Jan 22, 2016, at 8:22 AM, Lee M via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> This has likely been discussed already, but I haven't been able to find it anywhere.
>> Example:
>> 
>>    let items: Int = []
>> 
>>    for item in items {
>>        print(item)
>>    }
>>    else {
>>        print("No items")
>>    }
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160122/5838834b/attachment.html>


More information about the swift-evolution mailing list