table-protocol

Returns the test-function and hash-function for the <table>.  These functions are in turn used to implement the other collection operations on <table>.

The method for <object-table> returns == as the test-function and object-hash as the hash-function.

The method for <object-table> could be written as

define method table-protocol (table :: <object-table>)
=> test-function :: <function>,
hash-function :: <function>;
values(\==, object-hash);
end method table-protocol;

Exported from

Modifiers

open

Arguments

tableAn instance of <table>.

Values

test-functionAn instance of <function>.  Its signature is test-function( key1, key2 ) ⇒ boolean.
 test-function is used to compare keys.  It returns true if the keys are members of the same equivalence class according to the table’s equivalence predicate.
hash-functionAn instance of <function>.  Its signature is hash-function( key, initial-state ) ⇒ ( id, result-state )
 hash-function computes the hash code of the key, using the hash function associated with the table’s equivalence predicate.  The hash code is returned as two values, id (an integer) and state (a hash state).
The class of tables (also known as hash tables).
The class of tables that compare keys using ==.
Compares two objects for identity.
Returns a hash-code for object that corresponds to the equivalence predicate ==.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of objects that can be applied to arguments.