mirror of
https://github.com/ProgramSnail/Lama.git
synced 2026-01-03 20:48:15 +00:00
Included lama compilation in root's make regression target
This commit is contained in:
parent
52ef663986
commit
89536c67e0
3240 changed files with 14640 additions and 6 deletions
14
lama-compiler/regression/test054.lama
Normal file
14
lama-compiler/regression/test054.lama
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
var x;
|
||||
|
||||
fun sum (x) {
|
||||
case x of
|
||||
Nil -> 0
|
||||
| Cons (x, tl) -> (x + sum (tl))
|
||||
esac
|
||||
}
|
||||
|
||||
x := read ();
|
||||
|
||||
write (sum (Nil));
|
||||
write (sum (Cons (100, Nil)));
|
||||
write (sum (Cons (100, Cons (200, Nil))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue