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