-1 from me. I find list comprehensions, on average, roughly as concise as methods on SequenceType, and generally harder to understand as soon as you have more than one collection.
Jordan > On Dec 17, 2015, at 8:26 , Amir Michail via swift-evolution > <[email protected]> wrote: > > Python examples: > > l = [x*x for x in range(10)] // list comprehension > > l2 = [(x,y) for x in range(10) for y in range(10) if x + y < 8] // another > list comprehension > > g = (x*x for x in range(10)) // generator comprehension > > d = {x:x*x for x in range(10)} // dictionary comprehension > > > I think most programmers would like using these. They are concise and easy to > understand. > > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
