Proposal: Python's list, generator, and dictionary comprehensions

Or…

import Algorithms

_ = Dictionary(
    uniqueKeysWithValues: inputWords
        .indexed()
        .lazy
        .map(reverse)
)

I’m used to both and yet I still have a preference for the reduce-based approach. I guess it comes from the left-to-right ordering of this approach, or the fact that the action producing the result (reduce) is more explicitly stated.
Anyway, my point was not based on this preference, but just on the existence of this approach.

Indeed. My point was that since Swift already provides ways to write compact code similar to what comprehensions would allow, I don’t think it is worth adding the complexity of a new syntax, whose main benefit would only be its familiarity to Python users.

But of course, that’s just the opinion of one Swift user, with no weight in the evolution process. :slightly_smiling_face: