Extra iterator adaptors, functions and macros.
To extend [`Iterator`] with methods in this crate, import
the [`Itertools` trait](./trait.Itertools.html):
```
use itertools::Itertools;
```
Now, new methods like [`interleave`](./trait.Itertools.html#method.interleave)
are available on all iterators:
```
use itertools::Itertools;
let it = (1..3).interleave(vec![-1, -2]);
itertools::assert_equal(it, vec![1, -1, 2, -2]);
```
Most iterator methods are also provided as functions (with the benefit
that they convert parameters using [`IntoIterator`]):
```
use itertools::interleave;
for elt in interleave(&[1, 2, 3], &[2, 3, 4]) {
/* loop body */
}
```
## Crate Features
- `use_std`
- Enabled by default.
- Disable to compile itertools using `#![no_std]`. This disables
any items that depend on collections (like `group_by`, `unique`,
`kmerge`, `join` and many more).
## Rust Version
This version of itertools requires Rust 1.32 or later.
[`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html