lama_byterun/regression/test052.expr
2019-09-19 18:37:08 +03:00

26 lines
293 B
Text

global 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)