macro_rules! pipe {
($func:expr) => { ... };
($first:expr, $($rest:expr),+ $(,)?) => { ... };
}Expand description
Macro for creating function pipelines using comma-separated syntax.
This macro provides a left-to-right composition syntax where functions are applied in the order they appear, separated by commas. Returns a composed function rather than executing immediately.
ยงExamples
use rustica::category::function_category::pipe;
let pipeline = pipe!(|x: i32| x + 1, |x: i32| x * 2, |x: i32| x.to_string());
assert_eq!(pipeline(5), "12");