[][src]Macro cherries::minimum

macro_rules! minimum {
    ( $head:expr, $( $tail:expr ),* ) => { ... };
}

Fold left with min 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 = minimum!(a, b, c, d);
    assert_eq!(&1, res.quantity());