Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » hash tables » values
next | previous | forward | backward | up | index | toc

# values -- values in a hash table

- Usage:
    `values t`
- Inputs:
  - t, a hash table,
- Outputs:
  - a list, the values occurring in the hash table t

## Description

    i1 : x = new HashTable from {a => 1, b => 2}

    o1 = HashTable{a => 1}
                   b => 2

    o1 : HashTable

    i2 : values x

    o2 = {1, 2}

    o2 : List

## See also

- hash tables
- applyValues -- apply a function to each value in a hash table
- keys -- keys used in a hash table, dictionary, or database
- pairs -- list the pairs in a hash table, dictionary, or basic list
- scanValues -- apply a function to each value in a hash table or database
- # -- length or access to elements
- #? -- check existence of value in a list, hash table, database, or string

## Ways to use values:

- `values(Dictionary)`
- `values(HashTable)`

## For the programmer

The object values is a compiled function.

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