[swift-evolution] [Proposal] Remove eager `map` and `filter`

Антон Жилин antonyzhilin at gmail.com
Sun Jun 19 07:05:19 CDT 2016


1. Make sure that

Array(sequence.lazy.map { ... })   and   sequence.map { ... }
Array(sequence.lazy.filter { ... })   and   sequence.filter { ... }

are just as fast (with -O). "Fix lazy filter" proposal should help with
this.

2. Remove eager `map` and `filter`

3. Remove `lazy` property

sequence.map { ... }  will call lazy `map`, which is at least as fast as
eager version

4. Re-add `array` property to LazySequence

So that we can more easily convert to multipass sequence when needed.

- Anton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160619/a2988e62/attachment.html>


More information about the swift-evolution mailing list