Itertools — extra iterator adaptors, functions and macros
To use the iterator methods in this crate, import the Itertools trait:
To use the macros in this crate, use the
#[macro_use] extern crate itertools;
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.
A module of helper traits and iterators that are not intended to be used directly.
Create an iterator over the “cartesian product” of iterators.
Deprecated: use Zip::new instead.
A “meta iterator adaptor”. Its closure recives a reference to the iterator and may pick off as many elements as it likes, to produce the next iterator element.
Remove duplicates from sections of consecutive identical elements. If the iterator is sorted, all elements will be unique.
Clonable iterator adaptor to map elementwise
Group iterator elements. Consecutive elements that map to the same key ("runs"),
are returned as the iterator elements of
A sliced iterator.
Alternate elements from two iterators until both are run out
An iterator adaptor to insert a particular value between each element of the adapted iterator.
An iterator adaptor that merges the two base iterators in ascending order. If both base iterators are sorted (ascending), the result is sorted.
An Iterator adaptor that allows the user to peek at multiple .next() values without advancing itself.
An iterator adaptor that iterates over the cartesian product of the element sets of two iterators I and J.
An iterator adaptor that allows putting back a single item to the front of the iterator.
A wrapper for
An iterator adaptor that steps a number elements in the base iterator for each iteration.
Stride is similar to the slice iterator, but with a certain number of steps (the stride) skipped per iteration.
StrideMut is like Stride, but with mutable elements.
One half of an iterator pair where both return the same elements.
Iterator to repeat a simple number of times
Create an iterator running multiple iterators in lockstep.
An iterator which iterates two other iterators simultaneously
A value yielded by
Extra iterator methods for arbitrary iterators
A TrustedIterator has exact size, always.
Return an iterator with
Deprecated: Use .set_from() instead.