lama_byterun/regression/x86only/test004.expr

17 lines
271 B
Text
Raw Normal View History

2019-11-24 02:30:32 +03:00
external fun printf ();
2019-03-11 15:24:03 +03:00
fun hd (l) {
case l of
h : _ -> return h
esac
}
fun tl (l) {
case l of
_ : t -> return t
esac
}
printf ("%s\n", {1, 2, 3}.hd.string);
printf ("%s\n", {1, 2, 3, 4}.tl.string);
printf ("%s\n", {1, {2, 3, 4}, 5, 6}.tl.hd.hd.string)