HCoop
/
hcoop
/
debian
/
mlton.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Import Debian changes 20180207-1
[hcoop/debian/mlton.git]
/
benchmark
/
tests
/
flat-array.sml
1
structure
Main
=
2
struct
3
fun
doit n
=
4
let
5
val
v
=
Vector
.
tabulate
(
1000000
,
fn
i
=> (
i
,
i
+
1
))
6
fun
loop n
=
7
if
0
=
n
8
then
()
9
else
10
let
11
val
sum
=
Vector
.
foldl
(
fn
((
a
,
b
),
c
) =>
12
a
+
b
+
c
handle
Overflow
=>
0
)
0
v
13
in
14
loop
(
n
-
1
)
15
end
16
in
17
loop n
18
end
19
end
20