1use <prelude.kav>
2use <int.kav>
3use <list.kav> as list
4
5fn main() -> int {
6 val l = list::Cons(1, list::Cons(2, list::Cons(3, list::Cons(4, list::Nil))))
7 val e = list::filter(l, is_even)
8 val s = list::foldl(e, 0, add)
9 val _ = list::free(e)
10 s
11}