lama_byterun/regression/x86only/test004.lama
Dmitry Boulytchev 61296c51e7 Massive renaming
2020-02-16 00:21:15 +03:00

15 lines
No EOL
246 B
Text

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)