Understanding the tuple return in Stream.mapAccum's reducing logic

Why does Stream.mapAccum have a tuple in the return for the reducing logic?

Stream.mapAccum(0, (s, a) => [s + a, s + a])
Was this page helpful?