Files
Toy/scripts/small.toy

14 lines
137 B
Plaintext

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"