listtools.negate_elements_at_indices_absolutely — Abjad v1.1.1 documentation

### Navigation

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

# listtools.negate_elements_at_indices_absolutely

`abjad.tools.listtools.` `negate_elements_at_indices_absolutely`(l, indices, period=None)

  Negate the absolute value of elements in `l` at `indices`. When `period` is a positive integer, read `indices` cyclically according to `period`.

      abjad> l = [1, 2, 3, 4, 5, -6, -7, -8, -9, -10]
      abjad> listtools.negate_elements_at_indices(l, [0, 1, 2], period = None)
      [-1, -2, -3, 4, 5, -6, -7, -8, -9, -10]

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

  Raise `TypeError` when l is not a list:

      abjad> listtools.negate_elements_at_indices_absolutely('foo', [0, 1, 2])
      TypeError

### Navigation

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