mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-28 01:28:48 +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
26
regression/test086.expr
Normal file
26
regression/test086.expr
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
local n;
|
||||
|
||||
fun hd (l) {
|
||||
case l of
|
||||
h : _ -> h
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
fun tl (l) {
|
||||
case l of
|
||||
_ : tl -> tl
|
||||
esac
|
||||
}
|
||||
|
||||
fun print_list (l) {
|
||||
case l of
|
||||
{} -> skip
|
||||
| h : t -> write (h); print_list (t)
|
||||
esac
|
||||
}
|
||||
|
||||
n := read ();
|
||||
write ({1, 2, 3}.hd);
|
||||
print_list ({1, 2, 3}.tl)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue