mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-15 19:28:47 +00:00
Massive renaming
This commit is contained in:
parent
241ab0a9ae
commit
61296c51e7
152 changed files with 45 additions and 29 deletions
26
regression/test052.lama
Normal file
26
regression/test052.lama
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
local n;
|
||||
|
||||
fun hd (l) {
|
||||
case l of
|
||||
h : _ -> return h
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
fun tl (l) {
|
||||
case l of
|
||||
_ : tl -> return 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