[top][index]
search for:

toList HashTable -- convert to list

Synopsis:

  • Function: toList -- list of elements
  • Input:
  • an instance of class HashTable.
  • Output:
  • an instance of class List.
  • toList x -- provides a list of keys in the hash table x.

    For a set, which is implemented as a hash table where only the keys are important, this is a reasonable operation. See also, keys, which does the same thing.

    i1 : x = hashTable { a=>1, b=>2}

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

    o1 : HashTable
    i2 : toList x

    o2 = {a, b}

    o2 : List


    [top][index]
    search for: