HCoop
/
hcoop
/
debian
/
mlton.git
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(incremental) |
history
|
HEAD
Import Debian changes 20180207-1
[hcoop/debian/mlton.git]
/
regression
/
known-case1.sml
Commit
Line
Data
7f918cf1
CE
1
2
fun nlist 0 = 0::nil
3
| nlist n = n::(nlist (n-1))
4
5
val rec last =
6
fn nil => 0
7
| x::nil => x
8
| y::x::nil => y
9
| _ :: l => last l
10
11
val n = 1 + (last (nlist (10)))
12
13
val _ = print ((Int.toString n) ^ "\n")