Gregory Marton <[EMAIL PROTECTED]> writes:
> As an enhancement request, it would be nice for the common case to be able to
> pass a hash-function argument and assoc to make-hash-table or to have a
> (make-hashx-table hash assoc [size]), and in either case to remember the hash
> function so that resize works correctly.
Last email on this topic for tonight...!
Note that anyone wanting to implement this "saner" interface can
straightforwardly do so in Scheme:
(define hash-table-hash-fn (make-object-property))
(define hash-table-assoc-fn (make-object-property))
(define (make-hashx-table hash assoc . args)
(let ((t (apply make-hash-table args)))
(set! (hash-table-hash-fn t) hash)
(set! (hash-table-assoc-fn t) assoc)
t))
(define (hashx-table-ref t key)
(hashx-ref (hash-table-hash-fn t) (hash-table-assoc-fn t) t key))
etc.
Regards,
Neil