suma listy w rzutce
var sum = [1, 2, 3].reduce((a, b) => a + b);
Lazy Leopard
var sum = [1, 2, 3].reduce((a, b) => a + b);
int sum = [1, 2, 3].fold(0, (sum, current) => sum + current); // 6
int sum = [1, 2, 3].fold(0, (p, c) => p + c); // 6
int sum = [12, 32, 31].reduce((a, b) => a + b);