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

no-std iter_tools

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

18 releases (breaking)

0.15.0 Mar 22, 2024
0.13.0 Mar 16, 2024
0.4.0 Oct 28, 2023
0.1.4 Jul 15, 2022
0.1.0 Jan 11, 2022

#262 in Algorithms

Download history 1862/week @ 2023-12-18 933/week @ 2023-12-25 1508/week @ 2024-01-01 1686/week @ 2024-01-08 1518/week @ 2024-01-15 1548/week @ 2024-01-22 1220/week @ 2024-01-29 1761/week @ 2024-02-05 2314/week @ 2024-02-12 2513/week @ 2024-02-19 2351/week @ 2024-02-26 3283/week @ 2024-03-04 5980/week @ 2024-03-11 6469/week @ 2024-03-18 3011/week @ 2024-03-25 3820/week @ 2024-04-01

19,550 downloads per month
Used in 91 crates (16 directly)

MIT license

11KB
169 lines

Module :: iter_tools

experimentalrust-statusdocs.rsOpen 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

~440KB