mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
9 lines
114 B
Plaintext
9 lines
114 B
Plaintext
import compound;
|
|
|
|
fn f(acc, k, v) {
|
|
return acc + v;
|
|
}
|
|
|
|
var a = [1, 2, 3, 4];
|
|
|
|
print a.reduce(0, f); //prints "10" |