minimum

Find minimum

  1. E minimum(Range range, E seed)
  2. ElementType!Range minimum(Range range)
    ElementType!Range
    minimum
    (
    alias pred = "a < b"
    Range
    )
    (
    Range range
    )

Examples

assert(minimum([2, 1, 3]) == 1);
assert(minimum!"a > b"([2, 1, 3]) == 3);
assert(minimum([2, 1, 3], -1) == -1);
assert(minimum!"a > b"([2, 1, 3], 100) == 100);

Meta