Postfix calls

This commit is contained in:
Dmitry Boulytchev 2019-03-11 15:24:03 +03:00
parent e16fb72a9e
commit fe4e322d58
9 changed files with 87 additions and 15 deletions

24
regression/test052.expr Normal file
View file

@ -0,0 +1,24 @@
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)