#iterator #product #zip #data-structures #group-by

no-std itertools

Extra iterator adaptors, iterator methods, free functions, and macros

128 releases

0.12.1 Jan 29, 2024
0.12.0 Nov 14, 2023
0.11.0 Jun 22, 2023
0.10.5 Sep 20, 2022
0.0.3 Nov 29, 2014

#4 in Rust patterns

Download history 1145317/week @ 2023-12-23 1799876/week @ 2023-12-30 2325183/week @ 2024-01-06 2358475/week @ 2024-01-13 2445171/week @ 2024-01-20 2567282/week @ 2024-01-27 2651025/week @ 2024-02-03 2727203/week @ 2024-02-10 2628009/week @ 2024-02-17 2904007/week @ 2024-02-24 2927581/week @ 2024-03-02 2903213/week @ 2024-03-09 2915493/week @ 2024-03-16 2843917/week @ 2024-03-23 2963662/week @ 2024-03-30 2370158/week @ 2024-04-06

11,578,723 downloads per month
Used in 22,040 crates (5,337 directly)

MIT/Apache

405KB
8K SLoC

Itertools

Extra iterator adaptors, functions and macros.

Please read the API documentation here.

build_status crates.io

How to use with Cargo:

[dependencies]
itertools = "0.12.1"

How to use in your crate:

use itertools::Itertools;

How to contribute

  • Fix a bug or implement a new thing
  • Include tests for your new feature, preferably a QuickCheck test
  • Make a Pull Request

For new features, please first consider filing a PR to rust-lang/rust, adding your new feature to the Iterator trait of the standard library, if you believe it is reasonable. If it isn't accepted there, proposing it for inclusion in itertools is a good idea. The reason for doing is this is so that we avoid future breakage as with .flatten(). However, if your feature involves heap allocation, such as storing elements in a Vec<T>, then it can't be accepted into libcore, and you should propose it for itertools directly instead.

License

Dual-licensed to be compatible with the Rust project.

Licensed under the Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0 or the MIT license https://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.

Dependencies