Iterflow

Functional programming utilities for Rust.

This crate is heavily inspired by itertools but with the main focus of chaining operations to develop in a declarative approach (as opposed to usual imperative)

```rust fn sub_1(n: u32) -> Result { if n == 0 { Err("illegal!") } else { Ok(n - 1) } }

fn math_calc(n: u32) -> u32 { (n + 1) * 2 }

fn to_range(n: u32) -> Range { 0..n }

let it = (0..4) .map(sub1) .andthen(sub1) .mapok(mathcalc) .flatmapok(torange);

iterflow::assertequal( it, vec![ Err("illegal!"), Err("illegal!"), Ok(0), Ok(1), Ok(0), Ok(1), Ok(2), Ok(3), ], ); ```

TODO: - [ ] Support for async/await with Futures

License

Iterflow is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.