lama_byterun/regression/test086.lama

27 lines
278 B
Text
Raw Permalink Normal View History

var n;
2020-01-05 03:33:17 +03:00
fun hd (l) {
case l of
h : _ -> h
esac
}
fun tl (l) {
case l of
_ : tl -> 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)