iterate.backwards — Abjad v1.1.1 documentation

### Navigation

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

# iterate.backwards

`abjad.tools.iterate.` `backwards`(expr, klass=<class 'abjad.component.component._Component'>)

  Yield right-to-left instances of klass in expr.

      abjad> staff = Staff(FixedDurationTuplet((2, 8), construct.run(3)) * 2)
      abjad> pitchtools.diatonicize(staff)
      abjad> print staff.format
      \new Staff {
              \times 2/3 {
                      c'8
                      d'8
                      e'8
              }
              \times 2/3 {
                      f'8
                      g'8
                      a'8
              }
      }

      abjad> for x in iterate.backwards(staff, Note):
      ...     x
      ...
      Note(a', 8)
      Note(g', 8)
      Note(f', 8)
      Note(e', 8)
      Note(d', 8)
      Note(c', 8)

      abjad> for x in iterate.backwards(staff, FixedDurationTuplet):
      ...     x
      ...
      FixedDurationTuplet(1/4, [f'8, g'8, a'8])
      FixedDurationTuplet(1/4, [c'8, d'8, e'8])

  Note

  This naive iteration ignores threads.

### Navigation

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