#pipeline #closures #chain #map

yanked lazy-pipe

Chain closures into a pipeline

0.1.3 May 21, 2019
0.1.2 May 21, 2019
0.1.1 May 20, 2019
0.1.0 May 20, 2019

#150 in #closures

MIT license

6KB
100 lines

lazy-pipe

Chain closures into a pipeline

Usage

let expected = ((3 + 1) / 2).to_string();

let received = pipe(3)
    .map(|x| x + 1)
    .map(|x| x / 2)
    .map(|x| x.to_string())
    .unwrap();

assert_eq!(received, expected);

Documentation

License

MIT © Hoàng Văn Khải

No runtime deps