maximum

Find maximum

  1. E maximum(Range range, E seed)
    E
    maximum
    (
    alias pred = "a < b"
    Range
    E = ElementType!Range
    )
    (
    Range range
    ,
    )
    if (
    isInputRange!Range &&
    !isInfinite!Range
    )
  2. ElementType!Range maximum(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