Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Ockajak committed Jul 11, 2024
1 parent 44816b6 commit ff98553
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/extensions/collectible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
/// of the original collection.
///
/// Combinations for ordered collections are generated based on element positions, not values.
///
/// Therefore, if an ordered collection contains duplicate elements, the resulting combinations will too.
/// To obtain combinations of unique elements for ordered collections, use `.unique().combinations()`.
///
/// The order of combined values is preserved for ordered collections.
Expand Down Expand Up @@ -1023,10 +1023,10 @@ pub trait Collectible<Item>: IntoIterator<Item = Item> {
(result_left, result_right)
}

/// Creates a new collection containing all subsets of the original collection.
/// Creates a new collection containing all sub-collections of the original collection.
///
/// Sub-collections for ordered collections are generated based on element positions, not values.
///
/// Therefore, if an ordered collection contains duplicate elements, the resulting sub-collections will too.
/// To obtain combinations of unique elements for ordered collections, use `.unique().powerset()`.
///
/// The order of combined values is preserved for ordered collections.
Expand Down
14 changes: 8 additions & 6 deletions src/extensions/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,15 @@ pub trait Sequence<Item> {
}

// FIXME - fix failing test case
/// Creates a new collection containing members of k-fold cartesian product of specified size
/// Creates a new collection containing tuples of k-fold cartesian product of specified size
/// from the elements of the original collection.
///
/// The order or combined values is preserved.
/// Combinations are generated based on element positions, not values.
///
/// Members are generated based on element positions, not values.
/// Therefore, if this collection contains duplicate elements, the resulting tuples will too.
/// To obtain cartesian product of unique elements, use `.unique().cartesian_product()`.
///
/// The order or combined values is preserved.
///
/// # Example
///
/// ```
Expand Down Expand Up @@ -655,11 +656,12 @@ pub trait Sequence<Item> {
/// Creates a new collection containing combinations with repetition of specified size
/// from the elements of the original collection.
///
/// The order or combined values is preserved.
/// Combinations are generated based on element positions, not values.
///
/// Therefore, if this collection contains duplicate elements, the resulting combinations will too.
/// To obtain combination with repetition of unique elements, use `.unique().multicombinations()`.
///
/// The order or combined values is preserved.
///
/// # Example
///
/// ```
Expand Down

0 comments on commit ff98553

Please sign in to comment.