/usr/lib/s9fes/help/make-hash-table is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | S9 LIB (make-hash-table <option> ...) ==> hash-table
(alist->hash-table alist) ==> hash-table
(alist->hash-table alist integer) ==> hash-table
(hash-table-length hash-table) ==> integer
(hash-table-ref hash-table object) ==> value | #f
(hash-table-remove! hash-table object) ==> value | #f
(hash-table-set! hash-table object-k object-v) ==> unspecific
(hash-table->alist hash-table) ==> list
(load-from-library "hash-table.scm")
MAKE-HASH-TABLE creates a fresh hash table.
When the 'SIZE option is passed to it, it must be followed by
an integer ; specifying its initial number of slots. When no
initial value is specified, a built-in default will be used.
No matter what size is specified, the hash table will grow
automatically when the number of elements stored in it
exceeds its current size. When specifying an explicit size,
it should be a prime number.
When the 'TEST option is passed to MAKE-HASH-TABLE, it must
be followed by a predicate testing for the identity of keys.
The predicate defaults to EQUAL?, but a more specific and/or
more efficient predicate can be used when keys are limited to
the domain of such a predicate.
ALIST->HASH-TABLE creates a fresh hash table and inserts each
cdr element of the given ALIST into that table using the
associated car element as a key. It returns the new hash table.
When an additional INTEGER is passed to ALIST->HASH-TABLE, an
initial table of the given size will be allocated. The INTEGER
should be a prime number.
HASH-TABLE-LENGTH returns the number of objects currently
stored in the given hash table.
HASH-TABLE-REF retrieves a VALUE from a hash table using the
given OBJECT as key. It returns the value as the only element
of a fresh list. When no element with the given key exists,
it returns #F.
HASH-TABLE-REMOVE! removes the key OBJECT (and its associated
value) from the given hash table.
HASH-TABLE-SET! stores the value OBJECT-V under the key
OBJECT-K in the given hash-table.
HASH-TABLE->ALIST returns an association list containing all
pairs of the given hash table in no specific order.
(let ((h (make-hash-table)))
(hash-table-set! h "key" 'value)
(hash-table-ref h "key")) ==> (value)
|