#fundamental #general-purpose

iter_tools

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

5 releases

Uses new Rust 2021

0.1.4 Jul 15, 2022
0.1.3 May 26, 2022
0.1.2 May 26, 2022
0.1.1 May 12, 2022
0.1.0 Jan 11, 2022

#176 in Development tools

Download history 383/week @ 2022-08-03 352/week @ 2022-08-10 213/week @ 2022-08-17 394/week @ 2022-08-24 1944/week @ 2022-08-31 832/week @ 2022-09-07 729/week @ 2022-09-14 685/week @ 2022-09-21 869/week @ 2022-09-28 1064/week @ 2022-10-05 688/week @ 2022-10-12 1327/week @ 2022-10-19 1441/week @ 2022-10-26 1519/week @ 2022-11-02 1277/week @ 2022-11-09 1114/week @ 2022-11-16

5,471 downloads per month
Used in 63 crates (5 directly)

MIT license

1MB
27K SLoC

Module :: iter_tools

experimental rust-status docs.rs Open in Gitpod discord

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

Sample


#[ 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 sample/rust/iter_tools_trivial
cargo run

Dependencies

~350KB