0
games =
[ { id = 1
, points =
[ { player_id = 1, score = 20 }
, { player_id = 2, score = 10 }
, { player_id = 3, score = 0 }
]
}
, { id = 2
, points =
[ { player_id = 1, score = 20 }
, { player_id = 2, score = 5 }
, { player_id = 3, score = 0 }
]
}
, { id = 3
, points =
[ { player_id = 1, score = 20 }
, { player_id = 2, score = 5 }
, { player_id = 3, score = 10 }
]
}
]
我有一個'遊戲'記錄列表,每個記錄有每個玩家的點列表。 是否有可能通過fold
每個玩家在每個遊戲中的每個得分來顯示「總計」。榆樹:摺疊多個列表的具體值
喜歡的東西:
[ { player_id = 1, score = 60 }
, { player_id = 2, score = 20 }
, { player_id = 3, score = 10 }
]
在此先感謝。
輝煌的答案。謝謝。我有一些閱讀要做。 –