listtools.increase_cyclic — Abjad v1.1.1 documentation

### Navigation

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

# listtools.increase_cyclic

`abjad.tools.listtools.` `increase_cyclic`(l, s, shield=True, trim=True)

  Cyclically increase elements of l by the elements of s. Map nonpositive values to `1` by default.

      abjad> l = range(10)
      abjad> listtools.increase_cyclic(l, [2, 0])
      [2, 1, 4, 3, 6, 5, 8, 7, 10, 9]

      abjad> l = range(10)
      abjad> listtools.increase_cyclic(l, [10, -10])
      [10, 1, 12, 1, 14, 1, 16, 1, 18, 1]

      abjad> l = range(10)
      abjad> listtools.increase_cyclic(l, [10, -10], shield = False)
      [10, -9, 12, -7, 14, -5, 16, -3, 18, -1]

  Raise `TypeError` when l is neither list nor tuple:

      abjad> listtools.increase_cyclic('foo', [10, -10])
      TypeError

### Navigation

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