The Stack Overflow podcast is back! Listen to an interview with our new CEO.

 2 added 10 characters in body edited Mar 30 '17 at 6:15 WReach 55.8k22 gold badges122122 silver badges222222 bronze badges These are not functional solutions, but they are fairly concise owing to the "transparency" of associations to operators like Map and Exp: Module[{t = 0}, Map[t += # &, eg]] // Exp  or Set: Module[{e = eg}, e[[All]] = e // Values // Accumulate // Exp; e]  These solutions assume that the association eg is already in the desired order (like the file linked in the question -- use KeySort@eg if necessary). These are not functional solutions, but they are fairly concise owing to the "transparency" of associations to operators like Map: Module[{t = 0}, Map[t += # &, eg]] // Exp  or Set: Module[{e = eg}, e[[All]] = e // Values // Accumulate // Exp; e]  These solutions assume that the association eg is already in the desired order (like the file linked in the question -- use KeySort@eg if necessary). These are not functional solutions, but they are fairly concise owing to the "transparency" of associations to operators like Map and Exp: Module[{t = 0}, Map[t += # &, eg]] // Exp  or Set: Module[{e = eg}, e[[All]] = e // Values // Accumulate // Exp; e]  These solutions assume that the association eg is already in the desired order (like the file linked in the question -- use KeySort@eg if necessary). 1 answered Mar 30 '17 at 6:05 WReach 55.8k22 gold badges122122 silver badges222222 bronze badges These are not functional solutions, but they are fairly concise owing to the "transparency" of associations to operators like Map: Module[{t = 0}, Map[t += # &, eg]] // Exp  or Set: Module[{e = eg}, e[[All]] = e // Values // Accumulate // Exp; e]  These solutions assume that the association eg is already in the desired order (like the file linked in the question -- use KeySort@eg if necessary).