sumBefore method

T sumBefore(
  1. int index
)

Implementation

T sumBefore(int index) => sublist(0, index).sum;