listtools.cumulative_sums_zero — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »

# listtools.cumulative_sums_zero

`abjad.tools.listtools.` `cumulative_sums_zero`(l)

  Return a list of the cumulative sums of the elements in l, starting with `0`.

  Note

  `len(listtools.cumulative_sums_zero(l)) == len(l) + 1`.

      abjad> listtools.cumulative_sums_zero([1, 2, 3, 4, 5, 6, 7, 8])
      [0, 1, 3, 6, 10, 15, 21, 28, 36]

      abjad> listtools.cumulative_sums_zero([1, -2, 3, -4, 5, -6, 7, -8])
      [0, 1, -1, 2, -2, 3, -3, 4, -4]

  Raise `ValueError` when l is empty:

      abjad> listtools.cumulative_sums_zero([ ])
      ValueError

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »