Skip to content

Commit 70a2c56

Browse files
committed
Change method signature of cycled(times:) to use new FiniteCycle.
1 parent b4d0636 commit 70a2c56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Algorithms/Cycle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ extension Collection {
150150
///
151151
/// - Complexity: O(1)
152152
@inlinable
153-
public func cycled(times: Int) -> FlattenSequence<Repeated<Self>> {
154-
repeatElement(self, count: times).joined()
153+
public func cycled(times: Int) -> FiniteCycle<Self> {
154+
FiniteCycle(base: self, times: times)
155155
}
156156
}

0 commit comments

Comments
 (0)