diff --git a/Sources/Algorithms/Chain.swift b/Sources/Algorithms/Chain.swift index fc9f3ef..7ea5493 100644 --- a/Sources/Algorithms/Chain.swift +++ b/Sources/Algorithms/Chain.swift @@ -14,10 +14,12 @@ public struct Chain2 where Base1.Element == Base2.Element { /// The first sequence in this chain. - public let base1: Base1 + @usableFromInline + internal let base1: Base1 /// The second sequence in this chain. - public let base2: Base2 + @usableFromInline + internal let base2: Base2 @inlinable internal init(base1: Base1, base2: Base2) { diff --git a/Sources/Algorithms/Chunked.swift b/Sources/Algorithms/Chunked.swift index f57b1fc..14d0894 100644 --- a/Sources/Algorithms/Chunked.swift +++ b/Sources/Algorithms/Chunked.swift @@ -13,7 +13,8 @@ /// predicate or projection. public struct LazyChunked { /// The collection that this instance provides a view onto. - public let base: Base + @usableFromInline + internal let base: Base /// The projection function. @usableFromInline diff --git a/Sources/Algorithms/Combinations.swift b/Sources/Algorithms/Combinations.swift index c1e8c1c..ebc28ba 100644 --- a/Sources/Algorithms/Combinations.swift +++ b/Sources/Algorithms/Combinations.swift @@ -12,7 +12,8 @@ /// A collection wrapper that generates combinations of a base collection. public struct Combinations { /// The collection to iterate over for combinations. - public let base: Base + @usableFromInline + internal let base: Base @usableFromInline internal let baseCount: Int diff --git a/Sources/Algorithms/Cycle.swift b/Sources/Algorithms/Cycle.swift index 41d298b..d62ee49 100644 --- a/Sources/Algorithms/Cycle.swift +++ b/Sources/Algorithms/Cycle.swift @@ -12,7 +12,8 @@ /// A collection wrapper that repeats the elements of a base collection. public struct Cycle { /// The collection to repeat. - public let base: Base + @usableFromInline + internal let base: Base @inlinable internal init(base: Base) { @@ -24,10 +25,10 @@ extension Cycle: Sequence { /// The iterator for a `Cycle` sequence. public struct Iterator: IteratorProtocol { @usableFromInline - let base: Base + internal let base: Base @usableFromInline - var current: Base.Index + internal var current: Base.Index @inlinable internal init(base: Base) { diff --git a/Sources/Algorithms/Indexed.swift b/Sources/Algorithms/Indexed.swift index d81c9a7..19fbcbc 100644 --- a/Sources/Algorithms/Indexed.swift +++ b/Sources/Algorithms/Indexed.swift @@ -16,7 +16,8 @@ public struct Indexed { public typealias Element = (index: Base.Index, element: Base.Element) /// The base collection. - public let base: Base + @usableFromInline + internal let base: Base @inlinable internal init(base: Base) { diff --git a/Sources/Algorithms/Permutations.swift b/Sources/Algorithms/Permutations.swift index e72b6e1..e11d846 100644 --- a/Sources/Algorithms/Permutations.swift +++ b/Sources/Algorithms/Permutations.swift @@ -78,7 +78,8 @@ extension MutableCollection /// A sequence of all the permutations of a collection's elements. public struct Permutations { /// The base collection to iterate over for permutations. - public let base: Base + @usableFromInline + internal let base: Base @usableFromInline internal let baseCount: Int @@ -137,7 +138,7 @@ extension Permutations: Sequence { /// The iterator for a `Permutations` instance. public struct Iterator: IteratorProtocol { @usableFromInline - internal var base: Base + internal let base: Base @usableFromInline internal let baseCount: Int diff --git a/Sources/Algorithms/Product.swift b/Sources/Algorithms/Product.swift index 870ee1b..b1cd895 100644 --- a/Sources/Algorithms/Product.swift +++ b/Sources/Algorithms/Product.swift @@ -12,9 +12,12 @@ /// A sequence that represents the product of two sequences' elements. public struct Product2 { /// The outer sequence in the product. - public let base1: Base1 + @usableFromInline + internal let base1: Base1 + /// The inner sequence in the product. - public let base2: Base2 + @usableFromInline + internal let base2: Base2 @inlinable internal init(_ base1: Base1, _ base2: Base2) { diff --git a/Sources/Algorithms/Windows.swift b/Sources/Algorithms/Windows.swift index 03f9fad..336881b 100644 --- a/Sources/Algorithms/Windows.swift +++ b/Sources/Algorithms/Windows.swift @@ -47,8 +47,11 @@ extension Collection { /// A collection wrapper that presents a sliding window over the elements of /// a collection. public struct Windows { - public let base: Base - public let size: Int + @usableFromInline + internal let base: Base + + @usableFromInline + internal let size: Int @usableFromInline internal var firstUpperBound: Base.Index?