import compound; fn p(x) { print x; }; fn f(acc, k, v) { acc(v); return acc; } var a = [1, 2, 3, 4]; a.reduce(p, f); //prints "10"