@@ -39,14 +39,14 @@ extension Collection {
39
39
/// `RandomAccessCollection`, otherwise O(*k*) where `k` is `count`.
40
40
/// Access to successive windows is O(1).
41
41
@inlinable
42
- public func windows( ofCount count: Int ) -> WindowsCollection < Self > {
43
- WindowsCollection ( base: self , windowSize: count)
42
+ public func windows( ofCount count: Int ) -> WindowsOfCountCollection < Self > {
43
+ WindowsOfCountCollection ( base: self , windowSize: count)
44
44
}
45
45
}
46
46
47
47
/// A collection wrapper that presents a sliding window over the elements of
48
48
/// a collection.
49
- public struct WindowsCollection < Base: Collection > {
49
+ public struct WindowsOfCountCollection < Base: Collection > {
50
50
@usableFromInline
51
51
internal let base : Base
52
52
@@ -66,8 +66,8 @@ public struct WindowsCollection<Base: Collection> {
66
66
}
67
67
}
68
68
69
- extension WindowsCollection : Collection {
70
- /// A position in a `WindowsCollection ` instance.
69
+ extension WindowsOfCountCollection : Collection {
70
+ /// A position in a `WindowsOfCountCollection ` instance.
71
71
public struct Index : Comparable {
72
72
@usableFromInline
73
73
internal var lowerBound : Base . Index
@@ -331,7 +331,7 @@ extension WindowsCollection: Collection {
331
331
}
332
332
}
333
333
334
- extension WindowsCollection : BidirectionalCollection
334
+ extension WindowsOfCountCollection : BidirectionalCollection
335
335
where Base: BidirectionalCollection
336
336
{
337
337
@inlinable
@@ -351,10 +351,10 @@ extension WindowsCollection: BidirectionalCollection
351
351
}
352
352
}
353
353
354
- extension WindowsCollection : RandomAccessCollection
354
+ extension WindowsOfCountCollection : RandomAccessCollection
355
355
where Base: RandomAccessCollection { }
356
356
357
- extension WindowsCollection : LazySequenceProtocol , LazyCollectionProtocol
357
+ extension WindowsOfCountCollection : LazySequenceProtocol , LazyCollectionProtocol
358
358
where Base: LazySequenceProtocol { }
359
359
360
- extension WindowsCollection . Index : Hashable where Base. Index: Hashable { }
360
+ extension WindowsOfCountCollection . Index : Hashable where Base. Index: Hashable { }
0 commit comments