Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » lists and sequences » unsequence
next | previous | forward | backward | up | index | toc

# unsequence -- extract the single element from a sequence of length 1

- Usage:
    `unsequence x`
- Inputs:
  - x, a thing
- Outputs:
  - x#0, if x is a sequence of length 1, otherwise x

## Description

    i1 : unsequence (2:a)

    o1 = (a, a)

    o1 : Sequence

    i2 : unsequence (1:a)

    o2 = a

    o2 : Symbol

    i3 : unsequence (0:a)

    o3 = ()

    o3 : Sequence

## See also

- sequence -- make a sequence

## For the programmer

The object unsequence is a compiled function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_lists.m2:793:0.