#collection #fundamental #general-purpose #re-exports #iterate

no-std iter_tools

Collection of general purpose tools to iterate. Currently it simply reexports itertools.

24 releases (breaking)

0.21.0 Sep 5, 2024
0.20.0 Jul 13, 2024
0.19.0 Jun 29, 2024
0.15.0 Mar 22, 2024
0.1.0 Jan 11, 2022

#667 in Algorithms

Download history 2169/week @ 2024-06-20 1937/week @ 2024-06-27 1290/week @ 2024-07-04 1970/week @ 2024-07-11 2053/week @ 2024-07-18 1111/week @ 2024-07-25 1525/week @ 2024-08-01 1788/week @ 2024-08-08 2312/week @ 2024-08-15 1258/week @ 2024-08-22 3671/week @ 2024-08-29 3637/week @ 2024-09-05 1433/week @ 2024-09-12 3279/week @ 2024-09-19 3512/week @ 2024-09-26 2294/week @ 2024-10-03

10,723 downloads per month
Used in 116 crates (17 directly)

MIT license

35KB
401 lines

Module :: iter_tools

experimental rust-status docs.rs Open in Gitpod discord

Collection of general purpose tools to iterate. Currently it simply reexports itertools.

Basic use-case

# #[ cfg( feature = "itertools" ) ]
# {
  use iter_tools::*;

  /* standard functions */
  let vec = vec![ 5, 1, -2 ];
  let min = min( &vec );
  assert_eq!( *min.unwrap(), -2 );

  /* non standard functions */
  let vec = vec![ 5, 1, -2 ];
  let added = vec![ "a", "b", "c" ];
  let mut result = vec![];
  let zipped = zip( &vec, &added );
  for ( left, right ) in zipped
  {
    result.push( ( *left, *right ) );
  }
  assert_eq!( result, vec![ ( 5, "a" ), ( 1, "b" ), ( -2, "c" ) ] );
# }

To add to your project

cargo add iter_tools

Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/iter_tools_trivial
cargo run

`

Try out from the repository

git clone https://github.com/Wandalen/wTools
cd wTools
cd examples/iter_tools_trivial
cargo run

Dependencies

~460KB