split-iter Build Status

Provides the trait Splittable, which allows you to split an iterator according to a predicate.

Documentation

Usage

Add to your Cargo.toml:

toml [dependencies] split-iter = "0.1"

Example

```rust extern crate splititer; use splititer::Splittable;

fn main() { let (odd, even) = (1..10).split(|v| v % 2 == 0);

assert_eq!(odd.collect::<Vec<_>>(), [1,3,5,7,9]);
assert_eq!(even.collect::<Vec<_>>(), [2,4,6,8]);

} ```