Add the tiger source code bundle from the book site
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
915660c8a7
commit
33d8bac511
87 changed files with 3252 additions and 0 deletions
14
tiger/testcases/test5.tig
Normal file
14
tiger/testcases/test5.tig
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/* define valid recursive types */
|
||||
let
|
||||
/* define a list */
|
||||
type intlist = {hd: int, tl: intlist}
|
||||
|
||||
/* define a tree */
|
||||
type tree ={key: int, children: treelist}
|
||||
type treelist = {hd: tree, tl: treelist}
|
||||
|
||||
var lis:intlist := intlist { hd=0, tl= nil }
|
||||
|
||||
in
|
||||
lis
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue