> Le 16 nov. 2017 à 06:29, Matt Gallagher via swift-evolution > <swift-evolution@swift.org> a écrit : > > On the topic of a method that "compacts" without also mapping... I think this > encourages poor designs that should be using lazy transformations instead of > aggregate processing. There is almost always a way around a bare flatten. The > obvious quirkiness of `filterMap { $0 }` (or whatever the name ends up being) > should be seen as a nudge to re-think the algorithm leading up to that point.
I can hear the argument, but it errs in the side of premature optimization. Besides, seq.lazy.compacted() still has a meaning. Gwendal
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution