Commit | Line | Data |
---|---|---|
38ffcb1f SK |
1 | /* define valid recursive types */ |
2 | let | |
3 | /* define a list */ | |
4 | type intlist = {hd: int, tl: intlist} | |
5 | ||
6 | /* define a tree */ | |
7 | type tree ={key: int, children: treelist} | |
8 | type treelist = {hd: tree, tl: treelist} | |
9 | ||
10 | var lis:intlist := intlist { hd=0, tl= nil } | |
11 | ||
12 | in | |
13 | lis | |
14 | end |