Crates.io | lazy-pipe |
lib.rs | lazy-pipe |
version | 0.1.3 |
source | src |
created_at | 2019-05-20 18:32:21.252429 |
updated_at | 2019-05-21 06:32:44.300815 |
description | Chain closures into a pipeline |
homepage | |
repository | https://github.com/ksxrustcrates/lazy-pipe |
max_upload_size | |
id | 135676 |
size | 6,796 |
Chain closures into a pipeline
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);