Expand description
§Infix macro
A very simple procedural macro used to make infix function calls similarly to
Haskell’s syntax (#
instead of ```).
§Table of contents
§Example
use infix_fn::infix;
// Function definition:
fn add(lhs: i32, rhs: i32) -> i32 {
lhs + rhs
}
// Macro usage:
let (lhs, rhs) = (6, 9);
assert_eq!(lhs + rhs, infix!(lhs # add # rhs));