maximum

Find maximum

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

Examples

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

Meta