macro_rules! union {
($($proc_macro:tt)*) => { ... };
}Expand description
Use to combine sync results.
extern crate union;
use union::union;
fn main() {
let product = union! {
Ok::<_,u8>(2) |> |v| v + 2,
Ok::<_,u8>(3),
Ok::<_,u8>(4),
map => |a, b, c| a * b * c
}.unwrap();
assert_eq!(product, 48);
}