mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-25 08:08:47 +00:00
return fixed for real, tests added
This commit is contained in:
parent
644c1b3086
commit
274bda6938
95 changed files with 870 additions and 14 deletions
14
regression/test080.expr
Normal file
14
regression/test080.expr
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
local 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