EqTableΒΆ

The EqTable domain provides tables where the keys are compared using eq?. Keys are considered equal only if they are the same instance of a structure. This is useful if the keys are themselves updatable structures. Otherwise, all operations are the same as for type Table.

The operation table is here used to create a table where the keys are lists of integers.

e: EqTable(List Integer, Integer) := table()
 table()
                  Type: EqTable(List Integer,Integer)

These two lists are equal according to =, but not according to eq?.

l1 := [1,2,3]
 [1,2,3]
                  Type: List PositiveInteger

l2 := [1,2,3]
 [1,2,3]
                  Type: List PositiveInteger

Because the two lists are not eq?, separate values can be stored under each.

e.l1 := 111
 111
                  Type: PositiveInteger

e.l2 := 222
 222
                  Type: PositiveInteger

e.l1
 111
                  Type: PositiveInteger

See Also:

  • )help Table
  • )show EqTable

Table Of Contents

This Page