This crate defines traits and adaptors that allow for generalized handling of
sequential data. For the purposes of this crate, a "sequence" is a linear
collection of a known (at runtime) number of items. The Sequence and
MutSequence traits are the random access equivalent of std::iter::Iterator.
Examples
We bring the sequence traits into scope:
use ;
Now we can use std::ops::Range<usize> as a Sequence:
let x = 4..8;
assert_eq!;
assert_eq!;
Similarly for [usize], using Fully Qualified Syntax to disambiguate from the
inherent implementation of slice:
let x: & = &;
assert_eq!;
assert_eq!;
Sequence provides adaptors similar to std::iter::Iterator:
let x = ;
// Using Fully Qualified Syntax to disambiguate from `array::map()`.
let y = map;
assert!;
Further reading
See the crate documentation for a detailed description.