@code{hash-table/remove!} to remove the association being processed.
@end deffn
-The following procedure is an alternate form of @code{hash-table/get}
-that is useful in some situations. Usually, @code{hash-table/get} is
-preferable because it is faster.
+The following procedure is a more general form of
+@code{hash-table/get}. In circumstances where it is adequate,
+@code{hash-table/get} is usually preferable because it is faster.
@deffn procedure hash-table/lookup hash-table key if-found if-not-found
@var{If-found} must be a procedure of one argument, and
time required by this operation is bounded by a constant.
@end deffn
+The following procedures capture some common use patterns of hash
+tables that can be accelerated by dedicated operations.
+
+@deffn procedure hash-table/modify! hash-table key procedure default
+@var{Procedure} must be a procedure of one argument. Calls
+@var{procedure} on the datum associated with @var{key} in
+@var{hash-table} (or on @var{default} if there is no association for
+@var{key}), associates the result with @var{key}, and returns that
+same result. @var{Procedure} must not modify @var{hash-table}. Note:
+if @var{hash-table} is address-hashed (@pxref{Address Hashing}) or
+holds keys weakly @var{procedure} must not access @var{hash-table}
+either, because in these circumstances an access can trigger a
+deferred modification.
+@end deffn
+
+@deffn procedure hash-table/intern! hash-table key get-default
+@var{Get-default} must be a procedure of no arguments. Ensures that
+@var{hash-table} has an association for @var{key} and returns the
+associated datum. If @var{hash-table} did not have an association for
+@var{key}, invokes @var{get-default} on no arguments, associates the
+result with @var{key} in @var{hash-table}, and returns it. As with
+@code{hash-table/modify!}, @var{get-default} must not modify
+@var{hash-table}.
+@end deffn
+
@node Resizing of Hash Tables, Address Hashing, Basic Hash Table Operations, Hash Tables
@subsection Resizing of Hash Tables