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