[−][src]Macro cherries::maximum
Fold left with max
all given expression.
This marco uses partial_cmp
inside the expanded codes.
Panics if and only if partial_cmp
returns None
.
Examples
let a = Leaf::new().value(2).name("a").build(); let b = Leaf::new().value(3).name("b").build(); let c = Leaf::new().value(4).name("c").build(); let d = Leaf::new().value(1).name("d").build(); let res = maximum!(id(a), b, c, d); assert_eq!(&4, res.quantity());