macro_rules! constant1 {
($x:expr) => { ... };
}Expand description
The constant function constant1(x) = _ -> x also known as K (Kestrel) combinator.
ยงExample
use rust2fun::prelude::*;
let actual = Some(1).map(constant1!(2));
assert_eq!(Some(2), actual);