Module aoc::util::slice

source ·
Expand description

Extension methods for slices.

§Methods

permutations

Generates all possible permutations of a mutable slice, passing them one at a time to a callback function. Uses Heap’s algorithm for efficiency, modifying the slice in place.

fold_decimal

Accumulates a slice of digits from 0 to 9 inclusive into a single integer.

Traits§