system.nim: make min/max take openArrays, not varargs (breaking change)
This commit is contained in:
parent
08f5087d2c
commit
9aeccda262
1 changed files with 2 additions and 2 deletions
|
|
@ -1986,7 +1986,7 @@ proc min*(x, y: int64): int64 {.magic: "MinI", noSideEffect.} =
|
|||
## The minimum value of two integers.
|
||||
if x <= y: x else: y
|
||||
|
||||
proc min*[T](x: varargs[T]): T =
|
||||
proc min*[T](x: openArray[T]): T =
|
||||
## The minimum value of `x`. ``T`` needs to have a ``<`` operator.
|
||||
result = x[0]
|
||||
for i in 1..high(x):
|
||||
|
|
@ -2004,7 +2004,7 @@ proc max*(x, y: int64): int64 {.magic: "MaxI", noSideEffect.} =
|
|||
## The maximum value of two integers.
|
||||
if y <= x: x else: y
|
||||
|
||||
proc max*[T](x: varargs[T]): T =
|
||||
proc max*[T](x: openArray[T]): T =
|
||||
## The maximum value of `x`. ``T`` needs to have a ``<`` operator.
|
||||
result = x[0]
|
||||
for i in 1..high(x):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue