Crate const_combinations[][src]

Expand description

const fn combinations iter adapter

Examples

use const_combinations::IterExt;

let mut combinations = (1..5).combinations();
assert_eq!(combinations.next(), Some([1, 2, 3]));
assert_eq!(combinations.next(), Some([1, 2, 4]));
assert_eq!(combinations.next(), Some([1, 3, 4]));
assert_eq!(combinations.next(), Some([2, 3, 4]));
assert_eq!(combinations.next(), None);

Structs

An iterator that returns k-length combinations of values from iter.

An iterator that returns k-length permutations of values from iter.

An iterator that returns k-length combinations of values from slice.

An iterator that returns k-length permutations of values from slice.

Traits

An extension trait adding combinations and permutations to Iterator.

An extension trait adding combinations and permutations to Slice.