(let ((keywords (select-uncached-keywords message keywords)))
(if (pair? keywords)
(begin
- (hash-table/modify! message-sets keywords
- (lambda (messages) (cons message messages))
- '())
+ (hash-table/modify! message-sets keywords '()
+ (lambda (messages) (cons message messages)))
(set! count (+ count 1)))))))))))
(values message-sets count)))
(guarantee-hash-table table 'HASH-TABLE/PUT!)
((table-type-method:put! (table-type table)) table key datum))
-(define (hash-table/modify! table key procedure default)
+(define (hash-table/modify! table key default procedure)
(guarantee-hash-table table 'HASH-TABLE/MODIFY!)
- ((table-type-method:modify! (table-type table)) table key procedure default))
+ ((table-type-method:modify! (table-type table)) table key default procedure))
-(define (hash-table/intern! table key get-datum)
- (hash-table/modify! table
- key
- (lambda (datum)
- (if (eq? datum default-marker)
- (get-datum)
- datum))
- default-marker))
+(define (hash-table/intern! table key generator)
+ (hash-table/modify! table key default-marker
+ (lambda (datum)
+ (if (eq? datum default-marker) (generator) datum))))
(define (hash-table/remove! table key)
(guarantee-hash-table table 'HASH-TABLE/REMOVE!)
(define (make-method:modify! compute-hash! key=? entry-type)
(declare (integrate-operator compute-hash! key=? entry-type))
- (define (method:modify! table key procedure default)
+ (define (method:modify! table key default procedure)
(let ((hash (compute-hash! table key)))
(let loop ((p (vector-ref (table-buckets table) hash)) (q #f))
(if (pair? p)