Rivoreo Source Code Repositories
src.rivoreo.one
/
compiler-explorer
/
d3374dd4a676cae95060e69c7e852a388799e185
/
.
/
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
]