procedure: ht-alist ht [depth] ->
rnrs-hashtable [integer] -> list
converts a hashtable to an alist. if depth is greater than 0 any other
hashtables being values up to this nesting depth will be converted too.
scheme has a value for infinite that can be used as depth
syntax: ht-bind ht (key ...) body ...
procedure: ht-clear! hashtable [k] ->
procedure: ht-contains? hashtable key ->
procedure: ht-copy hashtable [mutable] ->
procedure: ht-copy* a f ->
call f with a copy of hashtable and return it
procedure: ht-copy-empty a ->
creates a new empty hashtable with the same equivalence and hash function as the input hashtable.
procedure: ht-create associations ... ->
{key value} ... -> hashtable
creates a hashtable.
example: (hashtable 'a 1 'b 2 'c 3)
syntax: ht-create-binding
syntax: ht-create-symbol-q
procedure: ht-delete! hashtable key ->
procedure: ht-each proc ht ->
procedure:{key value ->} hashtable ->
call proc for each key and value association in hashtable
syntax: ht-each-key proc ht
procedure: ht-entries hashtable ->
procedure: ht-equivalence-function hashtable ->
procedure: ht-fold proc init a ->
procedure:{key value state -> state} any hashtable -> list
procedure: ht-fold-right proc init a ->
procedure:{key value state -> state} any hashtable -> list
procedure: ht-from-alist a #:equal-f #:hash-f #:depth ->
list #:equal-f procedure #:hash-f procedure #:depth integer/infinite -> hashtable
convert alist
procedure: ht-from-list a [equal-proc hash-proc] ->
convert a list to an r6rs standard library hashtable. nested lists are not converted to a hash.
example
(ht-ref (ht-from-list (list 'a 1 'b 2)) 'b #f)
-> 2
procedure: ht-from-tree a [equal-proc hash-proc] ->
list [procedure:{a b -> boolean} procedure] -> rnrs-hashtable
like ht-from-list but also converts nested lists to nested hashtables
procedure: ht-hash-equal obj [size] ->
procedure: ht-hash-function hashtable ->
procedure: ht-hash-string a [b c d] ->
procedure: ht-hash-symbol obj [size] ->
procedure: ht-invert! a ->
use values as keys and keys as values
procedure: ht-keys hashtable ->
procedure: ht-make hash-function equiv [k] ->
procedure: ht-make-eq [k] ->
procedure: ht-make-eqv [k] ->
procedure: ht-map! proc a ->
procedure: ht-merge! a b ... ->
hashtable hashtable ... -> unspecified
copy the values of hash b to hash a. existing key values are overwritten
procedure: ht-object a [default] ->
hashtable [any:default] -> procedure:{any:key -> any:value/default}
procedure: ht-select a keys ->
procedure: ht-set! hashtable key obj ->
procedure: ht-set-multiple! ht assoc ... ->
hashtable key/value ...
return a new hashtable with multiple values having been added or updated
syntax: ht-set-multiple-q! a key/value ...
hashtable [any:unquoted-key any:value] ...
procedure: ht-size hashtable ->
syntax: ht-tree-and-ref h k
syntax: ht-tree-and-ref-q a key ...
procedure: ht-tree-contains? a keys ... ->
procedure: ht-tree-copy a ->
procedure: ht-tree-copy* a proc ->
procedure: ht-tree-merge! a b ... ->
hashtable ... -> unspecified
merges hashtables b from right to left into a. nested hashtables are merged recursively
syntax: ht-tree-ref-q a key ...
syntax: ht-tree-set! h k v
procedure: ht-update-multiple! ht keys proc ->
hashtable list procedure:{any:values ... -> (any:new-values ...)} -> hashtable
set values for
procedure: ht-values a ->
variable: sph-hashtable-description