procedure tblunion: table union procedure tblinter: table intersection procedure tbldiff: table difference procedure tblinvrt: table inversion procedure tbldflt: table default procedure twt: two-way table procedure keylist: list of keys in table procedure tbleq: table equivalence procedure vallist: list of table values procedure valset: set of table values
link tables
August 20, 1996; Ralph E. Griswold
Contributor: Alan Beale
This file is in the public domain.
keylist(T) produces list of keys in table T. kvallist(T) produces values in T ordered by sorted order of keys. tbleq(T1, T2) tests equivalences of tables T1 amd T2. tblunion(T1, T2) approximates T1 ++ T2. tblinter(T1, T2) approximates T1 ** T2. tbldiff(T1, T2) approximates T1 -- T2. tblinvrt(T) produces a table whose keys are T's values and whose values are T's keys. tbldflt(T) produces the default value for T. twt(T) produces a two-way table based on T. vallist(T) produces list of values in table T. ____________________________________________________________ For the operations on tables that mimic set operations, the correspondences are only approximate and do not have the mathematical properties of the corresponding operations on sets. For example, table "union" is not symmetric or transitive. Where there is potential asymmetry, the procedures "favor" their first argument. All the procedures that return tables return new tables and do not modify their arguments.