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

no-std iter_tools

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

20 releases (breaking)

new 0.17.0 May 18, 2024
0.15.0 Mar 22, 2024
0.4.0 Oct 28, 2023
0.1.4 Jul 15, 2022
0.1.0 Jan 11, 2022

#489 in Algorithms

Download history 1214/week @ 2024-01-27 1631/week @ 2024-02-03 2307/week @ 2024-02-10 2488/week @ 2024-02-17 2441/week @ 2024-02-24 2919/week @ 2024-03-02 5642/week @ 2024-03-09 7004/week @ 2024-03-16 3175/week @ 2024-03-23 3422/week @ 2024-03-30 2990/week @ 2024-04-06 3016/week @ 2024-04-13 4153/week @ 2024-04-20 5092/week @ 2024-04-27 5036/week @ 2024-05-04 7616/week @ 2024-05-11

22,438 downloads per month
Used in 92 crates (17 directly)

MIT license

11KB
169 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