#fundamental #general-purpose

iter_tools

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

7 releases

0.4.0 Oct 28, 2023
0.2.0 Oct 21, 2023
0.1.4 Jul 15, 2022
0.1.3 May 26, 2022
0.1.0 Jan 11, 2022

#439 in Development tools

Download history 1053/week @ 2023-08-09 1186/week @ 2023-08-16 1727/week @ 2023-08-23 1241/week @ 2023-08-30 2401/week @ 2023-09-06 1632/week @ 2023-09-13 1973/week @ 2023-09-20 1152/week @ 2023-09-27 1608/week @ 2023-10-04 1477/week @ 2023-10-11 1780/week @ 2023-10-18 2004/week @ 2023-10-25 1677/week @ 2023-11-01 1600/week @ 2023-11-08 2562/week @ 2023-11-15 2201/week @ 2023-11-22

8,399 downloads per month
Used in 66 crates (12 directly)

MIT license

10KB
152 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

Sample

discord Open in Gitpod docs.rs

Dependencies

~420KB