listtools.truncate_subruns — Abjad v1.1.1 documentation

### Navigation

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

# listtools.truncate_subruns

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

  Truncate subruns of like elements in l to length `1`:

      abjad> l = [1, 1, 2, 3, 3, 3, 9, 4, 4, 4]
      abjad> listtools.truncate_subruns(l)
      [1, 2, 3, 9, 4]

  Return empty list when l is empty:

      abjad> listtools.truncate_subruns([ ])
      []

  Raise `TypeError` when l is not a list:

      abjad> listtools.truncate_subruns(1)
      TypeError

### Navigation

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