On Monday, 23 July 2018 at 12:07:37 UTC, Seb wrote:

You could use chunkBy:

auto res = sarr.chunkBy!((a, b) => a.s == b.s).map!(a => tuple(a.front.s, a.map!(b => b.i).sum));
https://run.dlang.io/is/TJOEmf


Ha... This helps! Thanks a lot! :)

Reply via email to