next | previous | forward | backward | up | top | index | toc | home
Macaulay2 > The Macaulay2 language > hash tables > hashTable

hashTable -- make a hash table

Description

hashTable v -- produce a hash table from a list v of key-value pairs.

The pairs may be of the form a=>b, {a,b}, or (a,b).

Missing entries in the list, represented by null, will be silently ignored.

i1 : x = hashTable {a=>b, c=>d, }

o1 = HashTable{a => b}
               c => d

o1 : HashTable
i2 : x#a

o2 = b

o2 : Symbol

Ways to use hashTable :