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