mirror of
https://github.com/apple/swift-algorithms
synced 2026-11-28 04:44:20 +00:00
Curate documentation for Algorithms module (#201)
This commit is contained in:
1 parent
bfcaaa8758
commit
fc8fdfd4dc
17 files changed
+377
-5
No files matched your search
@@ -289,8 +289,8 @@ extension Collection {
|
||||
/// - Parameter k: The number of elements to include in each combination.
|
||||
///
|
||||
/// - Complexity: O(1) for random-access base collections. O(*n*) where *n*
|
||||
/// is the number of elements in the base collection, since
|
||||
/// `CombinationsSequence` accesses the `count` of the base collection.
|
||||
/// is the number of elements in the base collection, since
|
||||
/// `CombinationsSequence` accesses the `count` of the base collection.
|
||||
@inlinable
|
||||
public func combinations(ofCount k: Int) -> CombinationsSequence<Self> {
|
||||
precondition(k >= 0, "Can't have combinations with a negative number of elements.")
|
||||
|
||||
Reference in new issue
Block a user