listtools.sign — Abjad v1.1.1 documentation

### Navigation

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

# listtools.sign

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

  Return `1` when all elements in l are positive.

      abjad> listtools.sign([1, 2, 3])
      1

  Return `-1` when all elements in l are negative.

      abjad> listtools.sign([-1, -2, -3])
      -1

  Return `0` when l is empty.

      abjad> listtools.sign([ ])
      0

  Otherwise, return `None`.

      abjad> listtools.sign([1, 2, -3]) is None
      True

### Navigation

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