diff --git a/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift b/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift index 11042da5..e73860e9 100644 --- a/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift +++ b/Sources/ContainersPreview/Extensions/OutputSpan+Extras.swift @@ -128,4 +128,33 @@ extension OutputSpan /*where Element: Copyable*/ { } } +@available(SwiftStdlib 5.0, *) +extension OutputSpan where Element: ~Copyable { + @inlinable + package mutating func _remove( + from index: Int, + where shouldBeRemoved: (borrowing Element) -> Bool + ) { + precondition(index >= 0 && index <= count, "Index out of bounds") + self.withUnsafeMutableBufferPointer { buffer, count in + var i = index + var j = i + // Invariant: i ..< j is uninitialized + while j < count { + if shouldBeRemoved(buffer[j]) { + buffer.deinitializeElement(at: j) + j &+= 1 + } else { + if i != j { + buffer.initializeElement(at: i, to: buffer.moveElement(from: j)) + } + i &+= 1 + j &+= 1 + } + } + count = i + } + } +} + #endif diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift new file mode 100644 index 00000000..514b2753 --- /dev/null +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol+Filter.swift @@ -0,0 +1,66 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift Collections open source project +// +// Copyright (c) 2026 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +// SPDX-License-Identifier: Apache-2.0 WITH Swift-exception +// +//===----------------------------------------------------------------------===// + +#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW + +@available(SwiftStdlib 5.0, *) +extension BorrowingIteratorProtocol where Self: ~Copyable & ~Escapable { + @inlinable + @_lifetime(copy self) + public consuming func filter( + _ isIncluded: @escaping (borrowing Element) -> Bool + ) -> BorrowingFilter { + BorrowingFilter(_base: self, isIncluded: isIncluded) + } +} + +@available(SwiftStdlib 5.0, *) +public struct BorrowingFilter< + Base: BorrowingIteratorProtocol & ~Copyable & ~Escapable, +>: ~Copyable, ~Escapable { + public typealias Element = Base.Element + + @_alwaysEmitIntoClient + public let _isIncluded: (borrowing Element) -> Bool + + @_alwaysEmitIntoClient + public var _base: Base + + @inlinable + @_lifetime(copy _base) + internal init( + _base: consuming Base, + isIncluded: @escaping (borrowing Element) -> Bool + ) { + self._isIncluded = isIncluded + self._base = _base + } +} + +// FIXME: Sendable + +@available(SwiftStdlib 5.0, *) +extension BorrowingFilter: BorrowingIteratorProtocol { + @_lifetime(&self) + public mutating func nextSpan(maximumCount: Int) -> Span { + // FIXME: This is quite inefficient compared to Container's filter + while true { + let span = _base.nextSpan(maximumCount: 1) + if span.isEmpty { return span } + precondition(span.count == 1, "Invalid BorrowingIterator") + if _isIncluded(span[unchecked: 0]) { return span } + } + } +} + +#endif diff --git a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift index 5f7204b8..1e7a6050 100644 --- a/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift +++ b/Sources/ContainersPreview/Protocols/BorrowingIteratorProtocol.swift @@ -84,8 +84,7 @@ public protocol BorrowingIteratorProtocol: ~Copyable, ~Escapable { /// skip the requested number of items. In this case, the iterator's current /// position is set to the end of the sequence. /// - /// `maximumOffset` must be nonnegative, unless this is a bidirectional - /// or random-access iterator. + /// `maximumOffset` must be nonnegative. @_lifetime(self: copy self) mutating func skip(by maximumOffset: Int) -> Int diff --git a/Sources/ContainersPreview/Protocols/Container/Container+Filter.swift b/Sources/ContainersPreview/Protocols/Container/Container+Filter.swift new file mode 100644 index 00000000..e18c8afd --- /dev/null +++ b/Sources/ContainersPreview/Protocols/Container/Container+Filter.swift @@ -0,0 +1,109 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift Collections open source project +// +// Copyright (c) 2026 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +// SPDX-License-Identifier: Apache-2.0 WITH Swift-exception +// +//===----------------------------------------------------------------------===// + +#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW + +@available(SwiftStdlib 5.0, *) +extension Container where Self: ~Copyable /*& ~Escapable*/ { + @_lifetime(borrow self) + public func _filter( + _ isIncluded: @escaping (borrowing Element) -> Bool + ) -> ContainerFilter { + ContainerFilter(_base: self, isIncluded: isIncluded) + } +} + +@available(SwiftStdlib 5.0, *) +extension ContainerIterator { + @_lifetime(copy self) + public func filter( + _ isIncluded: @escaping (borrowing Element) -> Bool + ) -> ContainerFilter { + ContainerFilter(_base: _base, index: _position, isIncluded: isIncluded) + } +} + +@available(SwiftStdlib 5.0, *) +public struct ContainerFilter< + Base: Container & ~Copyable/* FIXME & ~Escapable */ +>: ~Copyable, ~Escapable { + public typealias Element = Base.Element + + @_alwaysEmitIntoClient + public let _isIncluded: (borrowing Element) -> Bool + + @_alwaysEmitIntoClient + public let _base: Borrow // FIXME: This does not allow escapable Bases + + @_alwaysEmitIntoClient + public var _position: Base.Index + + @_alwaysEmitIntoClient + public var _remainder: Span + + @inlinable + @_lifetime(copy _base) + internal init( + _base: Borrow, + index: Base.Index, + isIncluded: @escaping (borrowing Element) -> Bool + ) { + self._isIncluded = isIncluded + self._base = _base + self._position = index + self._remainder = .init() + } + + @inlinable + @_lifetime(borrow _base) + internal init( + _base: borrowing Base, + isIncluded: @escaping (borrowing Element) -> Bool + ) { + self._isIncluded = isIncluded + self._base = Borrow(_base) + self._position = _base.startIndex + self._remainder = .init() + } +} + +// FIXME: Sendable + +@available(SwiftStdlib 5.0, *) +extension ContainerFilter: BorrowingIteratorProtocol { + @_lifetime(copy self) + public mutating func nextSpan(maximumCount: Int) -> Span { + precondition(maximumCount > 0) + while true { + // Drop filtered out items from prefix of _remainder + var i = 0 + while i < _remainder.count, !_isIncluded(_remainder[unchecked: i]) { + i &+= 1 + } + _remainder = _remainder.extracting(droppingFirst: i) + // Return maximal + if !_remainder.isEmpty { + let c = Swift.min(_remainder.count, maximumCount) + i = 1 + while i < c, _isIncluded(_remainder[unchecked: i]) { + i &+= 1 + } + return _remainder._trim(first: i) + } + _remainder = _base.value.nextSpan(after: &_position) + if _remainder.isEmpty { return .init() } + } + } +} + +#endif diff --git a/Sources/ContainersPreview/Protocols/Container/ContainerAlgorithms.swift b/Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift similarity index 100% rename from Sources/ContainersPreview/Protocols/Container/ContainerAlgorithms.swift rename to Sources/ContainersPreview/Protocols/Container/Container+SpanwiseZip.swift diff --git a/Sources/ContainersPreview/Protocols/Container/Container.swift b/Sources/ContainersPreview/Protocols/Container/Container.swift index 1c253a61..a26d3219 100644 --- a/Sources/ContainersPreview/Protocols/Container/Container.swift +++ b/Sources/ContainersPreview/Protocols/Container/Container.swift @@ -391,58 +391,6 @@ extension Container where Self: ~Copyable & ~Escapable { public var underestimatedCount: Int { count } } - -@available(SwiftStdlib 5.0, *) -public struct ContainerIterator< - Base: Container & ~Copyable /*FIXME: & ~Escapable*/ ->: ~Copyable, ~Escapable { - let _base: Borrow // FIXME: This doesn't support nonescapable Bases - var _position: Base.Index - - @_lifetime(borrow base) - init(_borrowing base: borrowing @_addressable Base, from position: Base.Index) { - self._base = Borrow(_borrowing: base) - self._position = position - } -} - -@available(SwiftStdlib 5.0, *) -extension ContainerIterator: BorrowingIteratorProtocol -where Base: ~Copyable /*FIXME: & ~Escapable*/ -{ - public typealias Element = Base.Element - - @_unsafeNonescapableResult // FIXME: we cannot convert from a borrow to an inout dependence! - @_lifetime(&self) - public mutating func nextSpan(maximumCount: Int) -> Span { - _base.value.nextSpan(after: &self._position, maximumCount: maximumCount) - } - - @_lifetime(self: copy self) - public mutating func skip(by maximumOffset: Int) -> Int { - // FIXME: If we aren't modeling bidirectional iterators, then this should - // trap on negative maximumOffsets - var n = maximumOffset - let limit = (n < 0 ? _base.value.startIndex : _base.value.endIndex) - var i = self._position - self._base.value.formIndex(&i, offsetBy: &n, limitedBy: limit) - self._position = i - return maximumOffset - n - } -} - -@available(SwiftStdlib 5.0, *) -extension Container -where - Self: ~Copyable /*FIXME: & ~Escapable*/, - BorrowingIterator == ContainerIterator -{ - @_lifetime(borrow self) - public func makeBorrowingIterator() -> BorrowingIterator { - ContainerIterator(_borrowing: self, from: self.startIndex) - } -} - #endif extension Strideable { diff --git a/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift b/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift new file mode 100644 index 00000000..9d67d846 --- /dev/null +++ b/Sources/ContainersPreview/Protocols/Container/ContainerIterator.swift @@ -0,0 +1,79 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift Collections open source project +// +// Copyright (c) 2024 - 2026 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +// SPDX-License-Identifier: Apache-2.0 WITH Swift-exception +// +//===----------------------------------------------------------------------===// + +#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW + +@available(SwiftStdlib 5.0, *) +extension Container +where + Self: ~Copyable /*FIXME: & ~Escapable*/, + BorrowingIterator == ContainerIterator +{ + @_lifetime(borrow self) + public func makeBorrowingIterator() -> BorrowingIterator { + ContainerIterator(_borrowing: self, from: self.startIndex) + } +} + +@available(SwiftStdlib 5.0, *) +public struct ContainerIterator< + Base: Container & ~Copyable /*FIXME: & ~Escapable*/ +>: ~Copyable, ~Escapable { + let _base: Borrow // FIXME: This doesn't support nonescapable Bases + var _position: Base.Index + + @_lifetime(borrow base) + init(_borrowing base: borrowing @_addressable Base, from position: Base.Index) { + self._base = Borrow(_borrowing: base) + self._position = position + } +} + +@available(SwiftStdlib 5.0, *) +extension ContainerIterator: BorrowingIteratorProtocol +where Base: ~Copyable /*FIXME: & ~Escapable*/ +{ + public typealias Element = Base.Element + + @_unsafeNonescapableResult // FIXME: we cannot convert from a borrow to an inout dependence?! + @_lifetime(&self) + public mutating func nextSpan(maximumCount: Int) -> Span { + _base.value.nextSpan(after: &self._position, maximumCount: maximumCount) + } + +// @_lifetime(copy self) +// public mutating func nextSpan2(maximumCount: Int) -> Span { +// var i = self._position +// let span = _base.value.nextSpan( +// after: &i, +// maximumCount: maximumCount) +// _ = consume span +// let result = _overrideLifetime(span, copying: self) +// self._position = i +// return .init() +// } + + @_lifetime(self: copy self) + public mutating func skip(by maximumOffset: Int) -> Int { + // FIXME: If we aren't modeling bidirectional iterators, then this should + // trap on negative maximumOffsets + var n = maximumOffset + let limit = (n < 0 ? _base.value.startIndex : _base.value.endIndex) + var i = self._position + self._base.value.formIndex(&i, offsetBy: &n, limitedBy: limit) + self._position = i + return maximumOffset - n + } +} + +#endif diff --git a/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift b/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift index 8d02b911..232c3de3 100644 --- a/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift +++ b/Sources/ContainersPreview/Protocols/Container/MutableContainer.swift @@ -17,9 +17,6 @@ public protocol MutableContainer: PermutableContainer, ~Copyable, ~Escapable { // subscript(index: Index) -> Element { borrow mutate } - @_lifetime(self: copy self) - mutating func swapAt(_ i: Index, _ j: Index) - @_lifetime(&self) mutating func nextMutableSpan( after index: inout Index, diff --git a/Sources/ContainersPreview/Protocols/Drain+Map.swift b/Sources/ContainersPreview/Protocols/Drain+Map.swift index 4e433a99..132083e2 100644 --- a/Sources/ContainersPreview/Protocols/Drain+Map.swift +++ b/Sources/ContainersPreview/Protocols/Drain+Map.swift @@ -74,6 +74,8 @@ where var success = false while !target.isFull { var source = _base.drainNext(maximumCount: target.freeCapacity) + if source.isEmpty { break } + success = true while !source.isEmpty { try target.append(_transform(source.removeFirst())) } diff --git a/Sources/ContainersPreview/Protocols/Producer+Filter.swift b/Sources/ContainersPreview/Protocols/Producer+Filter.swift new file mode 100644 index 00000000..205129da --- /dev/null +++ b/Sources/ContainersPreview/Protocols/Producer+Filter.swift @@ -0,0 +1,92 @@ +//===----------------------------------------------------------------------===// +// +// This source file is part of the Swift Collections open source project +// +// Copyright (c) 2026 Apple Inc. and the Swift project authors +// Licensed under Apache License v2.0 with Runtime Library Exception +// +// See https://swift.org/LICENSE.txt for license information +// +// SPDX-License-Identifier: Apache-2.0 WITH Swift-exception +// +//===----------------------------------------------------------------------===// + +#if compiler(>=6.2) && COLLECTIONS_UNSTABLE_CONTAINERS_PREVIEW + +@available(SwiftStdlib 5.0, *) +extension Producer where Self: ~Copyable & ~Escapable { + @_lifetime(copy self) + public consuming func filter( + // Note: The predicate is not throwing to avoid difficult exception safety problems + _ isIncluded: @escaping (borrowing Element) -> Bool + ) -> ConsumingFilterProducer { + ConsumingFilterProducer(_base: self, isIncluded: isIncluded) + } +} + +@available(SwiftStdlib 5.0, *) +public struct ConsumingFilterProducer< + Base: Producer & ~Copyable & ~Escapable +>: ~Copyable, ~Escapable { + public typealias Element = Base.Element + public typealias ProducerError = Base.ProducerError + + @_alwaysEmitIntoClient + public var _base: Base + @_alwaysEmitIntoClient + public let _isIncluded: (borrowing Element) -> Bool + + @inlinable + @_lifetime(copy _base) + public init( + _base: consuming Base, + isIncluded: @escaping (borrowing Element) -> Bool + ) { + self._base = _base + self._isIncluded = isIncluded + } +} + +@available(SwiftStdlib 5.0, *) +extension ConsumingFilterProducer: Escapable +where + Base: ~Copyable, + Base: Escapable +{} + +@available(SwiftStdlib 5.0, *) +extension ConsumingFilterProducer: Producer where Base: ~Copyable & ~Escapable { + + @inlinable + public var underestimatedCount: Int { + _base.underestimatedCount + } + + @inlinable + public mutating func next() throws(ProducerError) -> Element? { + while let next = try _base.next() { + if _isIncluded(next) { return next } + } + return nil + } + + @inlinable + @discardableResult + @_lifetime(target: copy target) + @_lifetime(self: copy self) + public mutating func generate( + into target: inout OutputSpan + ) throws(ProducerError) -> Bool { + let startCount = target.count + repeat { + let prevCount = target.count + defer { + target._remove(from: prevCount, where: { !_isIncluded($0) }) + } + guard try _base.generate(into: &target) else { break } + } while target.count == startCount + return target.count > startCount + } +} + +#endif diff --git a/Xcode/Collections.xcodeproj/project.pbxproj b/Xcode/Collections.xcodeproj/project.pbxproj index 318da4b4..68fc08c4 100644 --- a/Xcode/Collections.xcodeproj/project.pbxproj +++ b/Xcode/Collections.xcodeproj/project.pbxproj @@ -132,13 +132,17 @@ 7D57EDDB2F647DB10029D5E3 /* BorrowingIteratorProtocol+Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDC22F647DB10029D5E3 /* BorrowingIteratorProtocol+Map.swift */; }; 7D57EDDC2F647DB10029D5E3 /* Producer+Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDD22F647DB10029D5E3 /* Producer+Reduce.swift */; }; 7D57EDDD2F647DB10029D5E3 /* RangeExpression2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDCC2F647DB10029D5E3 /* RangeExpression2.swift */; }; - 7D57EDDE2F647DB10029D5E3 /* ContainerAlgorithms.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDC72F647DB10029D5E3 /* ContainerAlgorithms.swift */; }; + 7D57EDDE2F647DB10029D5E3 /* Container+SpanwiseZip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDC72F647DB10029D5E3 /* Container+SpanwiseZip.swift */; }; 7D57EDDF2F647DB10029D5E3 /* Drain+Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDCF2F647DB10029D5E3 /* Drain+Map.swift */; }; 7D57EDE02F647DB10029D5E3 /* BorrowingIteratorProtocol+ElementsEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDC12F647DB10029D5E3 /* BorrowingIteratorProtocol+ElementsEqual.swift */; }; 7D57EDE12F647DB10029D5E3 /* BidirectionalContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDC52F647DB10029D5E3 /* BidirectionalContainer.swift */; }; 7D57EDE22F647DB10029D5E3 /* RangeReplaceableContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDCD2F647DB10029D5E3 /* RangeReplaceableContainer.swift */; }; 7D57EDE32F647DB10029D5E3 /* BorrowingIteratorProtocol+Reduce.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDC32F647DB10029D5E3 /* BorrowingIteratorProtocol+Reduce.swift */; }; 7D57EDE52F64828A0029D5E3 /* Producer+Collect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDE42F6482870029D5E3 /* Producer+Collect.swift */; }; + 7D57EDE72F6491400029D5E3 /* Producer+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDE62F64913C0029D5E3 /* Producer+Filter.swift */; }; + 7D57EDE92F6499750029D5E3 /* BorrowingIteratorProtocol+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDE82F64996D0029D5E3 /* BorrowingIteratorProtocol+Filter.swift */; }; + 7D57EDEB2F649CF40029D5E3 /* Container+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDEA2F649CEF0029D5E3 /* Container+Filter.swift */; }; + 7D57EDED2F649F0F0029D5E3 /* ContainerIterator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D57EDEC2F649F0C0029D5E3 /* ContainerIterator.swift */; }; 7D7246872F3D9DDB00112FD0 /* _HTable+Iteration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D7246802F3D9DDB00112FD0 /* _HTable+Iteration.swift */; }; 7D7246882F3D9DDB00112FD0 /* RigidDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D7246832F3D9DDB00112FD0 /* RigidDictionary.swift */; }; 7D7246892F3D9DDB00112FD0 /* _HTable+Find.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7D72467E2F3D9DDB00112FD0 /* _HTable+Find.swift */; }; @@ -713,7 +717,7 @@ 7D57EDC42F647DB10029D5E3 /* BorrowingIteratorProtocol+SpanwiseZip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BorrowingIteratorProtocol+SpanwiseZip.swift"; sourceTree = ""; }; 7D57EDC52F647DB10029D5E3 /* BidirectionalContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BidirectionalContainer.swift; sourceTree = ""; }; 7D57EDC62F647DB10029D5E3 /* Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Container.swift; sourceTree = ""; }; - 7D57EDC72F647DB10029D5E3 /* ContainerAlgorithms.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContainerAlgorithms.swift; sourceTree = ""; }; + 7D57EDC72F647DB10029D5E3 /* Container+SpanwiseZip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Container+SpanwiseZip.swift"; sourceTree = ""; }; 7D57EDC82F647DB10029D5E3 /* DynamicContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicContainer.swift; sourceTree = ""; }; 7D57EDC92F647DB10029D5E3 /* MutableContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MutableContainer.swift; sourceTree = ""; }; 7D57EDCA2F647DB10029D5E3 /* PermutableContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermutableContainer.swift; sourceTree = ""; }; @@ -725,6 +729,10 @@ 7D57EDD12F647DB10029D5E3 /* Producer+Map.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Producer+Map.swift"; sourceTree = ""; }; 7D57EDD22F647DB10029D5E3 /* Producer+Reduce.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Producer+Reduce.swift"; sourceTree = ""; }; 7D57EDE42F6482870029D5E3 /* Producer+Collect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Producer+Collect.swift"; sourceTree = ""; }; + 7D57EDE62F64913C0029D5E3 /* Producer+Filter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Producer+Filter.swift"; sourceTree = ""; }; + 7D57EDE82F64996D0029D5E3 /* BorrowingIteratorProtocol+Filter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "BorrowingIteratorProtocol+Filter.swift"; sourceTree = ""; }; + 7D57EDEA2F649CEF0029D5E3 /* Container+Filter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Container+Filter.swift"; sourceTree = ""; }; + 7D57EDEC2F649F0C0029D5E3 /* ContainerIterator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContainerIterator.swift; sourceTree = ""; }; 7D5A64D229CCE8CC00CB2595 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 7D5A64D329CCEE9A00CB2595 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 7D5A64D829CCF0FE00CB2595 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; @@ -1239,6 +1247,7 @@ children = ( 7D2A772A2F27F1E4005780C7 /* BorrowingIteratorProtocol.swift */, 7D57EDC12F647DB10029D5E3 /* BorrowingIteratorProtocol+ElementsEqual.swift */, + 7D57EDE82F64996D0029D5E3 /* BorrowingIteratorProtocol+Filter.swift */, 7D57EDC22F647DB10029D5E3 /* BorrowingIteratorProtocol+Map.swift */, 7D57EDC32F647DB10029D5E3 /* BorrowingIteratorProtocol+Reduce.swift */, 7D57EDC42F647DB10029D5E3 /* BorrowingIteratorProtocol+SpanwiseZip.swift */, @@ -1250,9 +1259,10 @@ 7D57EDCF2F647DB10029D5E3 /* Drain+Map.swift */, 7D57EDD02F647DB10029D5E3 /* Drain+Reduce.swift */, 7D2A77302F27F1E4005780C7 /* Producer.swift */, + 7D57EDE42F6482870029D5E3 /* Producer+Collect.swift */, + 7D57EDE62F64913C0029D5E3 /* Producer+Filter.swift */, 7D57EDD12F647DB10029D5E3 /* Producer+Map.swift */, 7D57EDD22F647DB10029D5E3 /* Producer+Reduce.swift */, - 7D57EDE42F6482870029D5E3 /* Producer+Collect.swift */, ); path = Protocols; sourceTree = ""; @@ -1397,7 +1407,9 @@ children = ( 7D57EDC52F647DB10029D5E3 /* BidirectionalContainer.swift */, 7D57EDC62F647DB10029D5E3 /* Container.swift */, - 7D57EDC72F647DB10029D5E3 /* ContainerAlgorithms.swift */, + 7D57EDEC2F649F0C0029D5E3 /* ContainerIterator.swift */, + 7D57EDEA2F649CEF0029D5E3 /* Container+Filter.swift */, + 7D57EDC72F647DB10029D5E3 /* Container+SpanwiseZip.swift */, 7D57EDC82F647DB10029D5E3 /* DynamicContainer.swift */, 7D57EDC92F647DB10029D5E3 /* MutableContainer.swift */, 7D57EDCA2F647DB10029D5E3 /* PermutableContainer.swift */, @@ -2630,6 +2642,7 @@ 7DE9201129CA70F3004483EB /* OrderedDictionary+Initializers.swift in Sources */, 7D479CBD2F46D05600A8CB59 /* RigidSet+Lookup.swift in Sources */, 7DE9212B29CA70F4004483EB /* TreeSet+SetAlgebra subtracting.swift in Sources */, + 7D57EDE92F6499750029D5E3 /* BorrowingIteratorProtocol+Filter.swift in Sources */, 7DE920F629CA70F4004483EB /* BitArray+Equatable.swift in Sources */, 7D9B859829E4F74400B291CD /* BitArray+Descriptions.swift in Sources */, 7DE9212329CA70F4004483EB /* TreeSet+SetAlgebra isEqualSet.swift in Sources */, @@ -2760,6 +2773,8 @@ 7D479CBF2F46D0A200A8CB59 /* RigidSet+Insertions.swift in Sources */, 7DE9216729CA70F4004483EB /* TreeDictionary+Equatable.swift in Sources */, 7DE9201F29CA70F3004483EB /* OrderedSet+RandomAccessCollection.swift in Sources */, + 7D57EDE72F6491400029D5E3 /* Producer+Filter.swift in Sources */, + 7D57EDED2F649F0F0029D5E3 /* ContainerIterator.swift in Sources */, 7DE9202E29CA70F3004483EB /* OrderedSet+UnorderedView.swift in Sources */, 7DE9215F29CA70F4004483EB /* _UnsafePath.swift in Sources */, 7DE9202829CA70F3004483EB /* OrderedSet+Partial SetAlgebra isSubset.swift in Sources */, @@ -2946,7 +2961,7 @@ 7D57EDDB2F647DB10029D5E3 /* BorrowingIteratorProtocol+Map.swift in Sources */, 7D57EDDC2F647DB10029D5E3 /* Producer+Reduce.swift in Sources */, 7D57EDDD2F647DB10029D5E3 /* RangeExpression2.swift in Sources */, - 7D57EDDE2F647DB10029D5E3 /* ContainerAlgorithms.swift in Sources */, + 7D57EDDE2F647DB10029D5E3 /* Container+SpanwiseZip.swift in Sources */, 7D57EDDF2F647DB10029D5E3 /* Drain+Map.swift in Sources */, 7D57EDE02F647DB10029D5E3 /* BorrowingIteratorProtocol+ElementsEqual.swift in Sources */, 7D57EDE12F647DB10029D5E3 /* BidirectionalContainer.swift in Sources */, @@ -2959,6 +2974,7 @@ 7DE920BF29CA70F4004483EB /* BitSet+Codable.swift in Sources */, 7DE9203329CA70F3004483EB /* OrderedSet+Testing.swift in Sources */, 7DE9212429CA70F4004483EB /* TreeSet+Descriptions.swift in Sources */, + 7D57EDEB2F649CF40029D5E3 /* Container+Filter.swift in Sources */, 7DE9217129CA70F4004483EB /* TreeDictionary+Values.swift in Sources */, 7D2A77262F27F1D1005780C7 /* Span+Extras.swift in Sources */, 7DE920D029CA70F4004483EB /* BitSet+SetAlgebra isSubset.swift in Sources */,