Rivoreo Source Code Repositories
src.rivoreo.one
/
compiler-explorer
/
66549cde39e29150470f0a5a21769d8d4d0c1122
/
.
/
examples
/
nim
/
Max_array.nim
blob: 52e3e79f2989ba4f4e6c5ad9c3968c6d75ed6276 [
file
] [
log
] [
blame
] [
raw
]
# For best results compile with -d:danger
proc maxArray
(
x
:
var
seq
[
float
],
y
:
seq
[
float
])
{.
exportc
.}
=
for
i
in
0
..<
x
.
len
:
if
y
[
i
]
>
x
[
i
]:
x
[
i
]
=
y
[
i
]