next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Macaulay2Doc :: applyKeys(HashTable,Function,Function)

applyKeys(HashTable,Function,Function) -- apply a function to each key in a hash table with collision handling

Synopsis

Description

i1 : H = new HashTable from {1 => 10, 2 => 15, 3 => 20}

o1 = HashTable{1 => 10}
               2 => 15
               3 => 20

o1 : HashTable
i2 : applyKeys(H, k -> k//2, max)

o2 = HashTable{0 => 10}
               1 => 20

o2 : HashTable

See also