summaryrefslogtreecommitdiffstats
path: root/srfi/srfi-69-impl.scm
diff options
context:
space:
mode:
authorGravatar John Cowan 2021-11-23 14:21:56 -0500
committerGravatar John Cowan 2021-11-23 14:21:56 -0500
commita6fbdb2cfe97b41c4479170d80934f218a1553a8 (patch)
treeb538484cf28d6b09b0cf021529302fc6b4273697 /srfi/srfi-69-impl.scm
parentimproved rationale (diff)
dto and find-update
Diffstat (limited to '')
-rw-r--r--srfi/srfi-69-impl.scm46
1 files changed, 23 insertions, 23 deletions
diff --git a/srfi/srfi-69-impl.scm b/srfi/srfi-69-impl.scm
index 734c6b4..c61036e 100644
--- a/srfi/srfi-69-impl.scm
+++ b/srfi/srfi-69-impl.scm
@@ -1,21 +1,21 @@
-(define srfi-69-dtd
+(define srfi-69-dto
(let ()
- (define (prep-dtd-arg proc)
- (lambda (dtd . args)
+ (define (prep-dto-arg proc)
+ (lambda (dto . args)
(apply proc args)))
- (define (t69-hash-table-mutable?* dtd table)
+ (define (t69-hash-table-mutable?* dto table)
#t)
- (define (t69-hash-table-ref* dtd table key fail success)
+ (define (t69-hash-table-ref* dto table key fail success)
(define default (cons #f #f))
(define found (t69-hash-table-ref/default table key default))
(if (eq? found default)
(fail)
(success found)))
- (define (t69-hash-table-set!* dtd table . obj)
+ (define (t69-hash-table-set!* dto table . obj)
(let loop ((obj obj))
(if (null? obj)
table
@@ -23,36 +23,36 @@
(t69-hash-table-set! table (car obj) (cadr obj))
(loop (cddr obj))))))
- (define (t69-hash-table-update!/default* dtd table key proc default)
+ (define (t69-hash-table-update!/default* dto table key proc default)
(t69-hash-table-update!/default table key proc default)
table)
- (define (t69-hash-table-delete-all!* dtd table keys)
+ (define (t69-hash-table-delete-all!* dto table keys)
(for-each
(lambda (key)
(t69-hash-table-delete! table key))
keys)
table)
- (define (t69-hash-table-foreach* dtd proc table)
+ (define (t69-hash-table-foreach* dto proc table)
(t69-hash-table-walk table proc))
- (define (t69-hash-table-map!* dtd proc table)
+ (define (t69-hash-table-map!* dto proc table)
(t69-hash-table-walk table (lambda (key value)
(t69-hash-table-set! table key (proc key value))))
table)
- (define (t69-hash-table-filter!* dtd proc table)
+ (define (t69-hash-table-filter!* dto proc table)
(t69-hash-table-walk table
(lambda (key value)
(unless (proc key value)
(t69-hash-table-delete! table key))))
table)
- (define (t69-hash-table-fold* dtd proc knil table)
+ (define (t69-hash-table-fold* dto proc knil table)
(t69-hash-table-fold table proc knil))
- (define (t69-hash-table-alter!* dtd table key fail success)
+ (define (t69-hash-table-find-update!* dto table key fail success)
(define (handle-success value)
(define (update new-key new-value)
(unless (eq? new-key key)
@@ -77,29 +77,29 @@
(handle-fail)
(handle-success found)))
- (define (t69-hash-table-comparator* dtd table)
+ (define (t69-hash-table-comparator* dto table)
(make-comparator (lambda args #t)
(or (t69-hash-table-equivalence-function table)
equal?)
#f
(t69-hash-table-hash-function table)))
- (make-dtd
- dictionary?-id (prep-dtd-arg t69-hash-table?)
+ (make-dto
+ dictionary?-id (prep-dto-arg t69-hash-table?)
dict-mutable?-id t69-hash-table-mutable?*
dict-ref-id t69-hash-table-ref*
- dict-ref/default-id (prep-dtd-arg t69-hash-table-ref/default)
+ dict-ref/default-id (prep-dto-arg t69-hash-table-ref/default)
dict-set-id t69-hash-table-set!*
dict-delete-all-id t69-hash-table-delete-all!*
- dict-contains?-id (prep-dtd-arg t69-hash-table-exists?)
+ dict-contains?-id (prep-dto-arg t69-hash-table-exists?)
dict-update/default-id t69-hash-table-update!/default*
- dict-size-id (prep-dtd-arg t69-hash-table-size)
- dict-keys-id (prep-dtd-arg t69-hash-table-keys)
- dict-values-id (prep-dtd-arg t69-hash-table-values)
+ dict-size-id (prep-dto-arg t69-hash-table-size)
+ dict-keys-id (prep-dto-arg t69-hash-table-keys)
+ dict-values-id (prep-dto-arg t69-hash-table-values)
dict-map-id t69-hash-table-map!*
dict-filter-id t69-hash-table-filter!*
dict-for-each-id t69-hash-table-foreach*
dict-fold-id t69-hash-table-fold*
- dict->alist-id (prep-dtd-arg t69-hash-table->alist)
- dict-alter-id t69-hash-table-alter!*
+ dict->alist-id (prep-dto-arg t69-hash-table->alist)
+ dict-find-update-id t69-hash-table-find-update!*
dict-comparator-id t69-hash-table-comparator*)))