hashtable-equivalence-function, hashtable-hash-function, hashtable-mutable? - hashtable inspection functions
LIBRARY
(import (rnrs)) ;R6RS
(import (rnrs hashtables)) ;R6RS
SYNOPSIS
(hashtable-equivalence-function hashtable)
(hashtable-hash-function hashtable)
(hashtable-mutable? hashtable)
DESCRIPTION
The
hashtable-equivalence-function
procedure returns the equivalence function used by hashtable to
compare keys.
For hashtables created by
make-eq-hashtable(3scm)
and
make-eqv-hashtable(3scm),
this procedure returns the procedure objects
eq?
and
eqv?,
respectively.
The
hashtable-hash-function
procedure returns the hash function used by
hashtable.
For hashtables created by
make-eq-hashtable(3scm)
or
make-eqv-hashtable(3scm),
#f
is returned.
The
hashtable-mutable?
procedure
returns
#t
if hashtable is mutable, otherwise
#f.
RETURN VALUES
These procedures return a single value; an object as described above.
APPLICATION USAGE
These procedures are rarely used outside of procedures that print
hashtables.
RATIONALE
The hash functions for hashtables created by
make-eq-hashtable(3scm)
or
make-eqv-hashtable(3scm),
are private to the implementation. This is because implementations may
use garbage collectors that move objects and this movement can change
the hash value of affected objects.
COMPATIBILITY
These procedures are unique to R6RS. Compatible procedures can sorta
be found in SRFI-69, SRFI-125 and SRFI-126.
ERRORS
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
-
The wrong number of arguments was passed or an argument was outside its domain.
In particular,
hashtable
should be a hashtable.
SEE ALSO
make-hashtable(3scm)
STANDARDS
R6RS
HISTORY
These procedures first appeared in R6RS's hashtable library, which was
based on SRFI-69, which also has the first two procedures.
AUTHORS
This page is part of the
scheme-manpages
project.
It includes materials from the RnRS documents.
More information can be found at
https://github.com/schemedoc/manpages/
.
Markup created by unroff 1.0sc, March 04, 2023.