📜  列表的飞镖总和 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:50.040000             🧑  作者: Mango

代码示例2
int sum = [1, 2, 3].fold(0, (sum, current) => sum + current); // 6
int sum = [1, 2, 3].fold(0, (p, c) => p + c); // 6