[swift-evolution] Using "where" to filter an array

Charles Constant charles at charlesism.com
Sat Dec 19 21:43:08 CST 2015

I noticed several weeks ago that the following is illegal:

    let new_arr = el in arr where el.is_foo // illegal

I assumed it would work because it's consistent with the filtering that
exists in a "for" loop, i.e.:

    for el in arr where el.is_foo // legal

Is this "new proposal" material? I thought I would check in case it's
already on the roadmap, or inherently wrong.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151219/dbc6391c/attachment.html>

More information about the swift-evolution mailing list