pipe-op 0.0.1

The elixir pipe operator as a macro in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
use pipe_op::pipe;

fn add(a: usize, b: usize) -> Result<usize, ()> {
    Ok(a + b)
}

fn main() {
    let e = 10;
    assert_eq!(pipe!(e, add(10).unwrap()), 20);
}