This crate aims to provide various tools for slices.
This crate use its own streaming iterator
due to the lack of generic associated type in the language:
you therefore cannot use those iterators with the for
control flow.
Use the while let
control flow, or the macro helper, as you can see below.
Example
Cargo.toml:
[dependencies]
slicetools = "0.2.*"
main.rs:
extern crate slicetools;
use *;
let mut v = vec!;
assert_eq!;
Or, with the helper macro:
extern crate slicetools;
use *;
let mut v = vec!;
stream!;
assert_eq!;
Changelog
0.3.*
- Add 3 new extensions to take groups of items.
0.2.*
-
Use own streaming iterator instead of regular iterator that was unsafe (allowed multiple mutable borrowing on the same item).
-
Add a new streamer for doing a cartesian product between two slices.