summaryrefslogtreecommitdiffstats
path: root/srfi/srfi-69-impl.scm
diff options
context:
space:
mode:
authorGravatar Arvydas Silanskas 2021-08-19 00:51:49 +0300
committerGravatar Arvydas Silanskas 2021-08-19 00:51:49 +0300
commitfc1b8c9e34f7b6094dfec60237735b588a82e6e6 (patch)
tree2c00d2f8cea0532a005a659af6c7bdad25dfc4fa /srfi/srfi-69-impl.scm
parentsrfi 126 impl (diff)
mapping implementation
Diffstat (limited to '')
-rw-r--r--srfi/srfi-69-impl.scm44
1 files changed, 12 insertions, 32 deletions
diff --git a/srfi/srfi-69-impl.scm b/srfi/srfi-69-impl.scm
index f0e397e..4151dba 100644
--- a/srfi/srfi-69-impl.scm
+++ b/srfi/srfi-69-impl.scm
@@ -1,6 +1,10 @@
(define srfi-69-dtd
(let ()
+ (define (prep-dtd-arg proc)
+ (lambda (dtd . args)
+ (apply proc args)))
+
(define (t69:make-hash-table* dtd comparator)
(define constructor-args
(if (not comparator)
@@ -87,27 +91,6 @@
(define (t69:hash-table-search* dtd table key fail success)
(t69:hash-table-search!* dtd (dict-copy dtd table) key fail success))
- (define (t69:hash-table-values* dtd table)
- (t69:hash-table-values table))
-
- (define (t69:hash-table->alist* dtd table)
- (t69:hash-table->alist table))
-
- (define (t69:hash-table-keys* dtd table)
- (t69:hash-table-keys table))
-
- (define (t69:hash-table-size* dtd table)
- (t69:hash-table-size table))
-
- (define (t69:hash-table-exists?* dtd table key)
- (t69:hash-table-exists? table key))
-
- (define (t69:hash-table-ref/default* dtd table key default)
- (t69:hash-table-ref/default table key default))
-
- (define (t69:hash-table?* dtd table)
- (t69:hash-table? table))
-
(define (t69:hash-table-comparator* dtd table)
(make-comparator (lambda args #t)
(or (t69:hash-table-equivalence-function table)
@@ -115,28 +98,25 @@
#f
(t69:hash-table-hash-function table)))
- (define (t69:hash-table-copy* dtd table)
- (t69:hash-table-copy table))
-
(make-dtd
make-dictionary-index t69:make-hash-table*
- dictionary?-index t69:hash-table?*
+ dictionary?-index (prep-dtd-arg t69:hash-table?)
dict-ref-index t69:hash-table-ref*
- dict-ref/default-index t69:hash-table-ref/default*
+ dict-ref/default-index (prep-dtd-arg t69:hash-table-ref/default)
dict-set!-index t69:hash-table-set!*
dict-delete-all!-index t69:hash-table-delete-all!*
- dict-contains?-index t69:hash-table-exists?*
+ dict-contains?-index (prep-dtd-arg t69:hash-table-exists?)
dict-update/default!-index t69:hash-table-update!/default*
- dict-size-index t69:hash-table-size*
- dict-keys-index t69:hash-table-keys*
- dict-values-index t69:hash-table-values*
+ dict-size-index (prep-dtd-arg t69:hash-table-size)
+ dict-keys-index (prep-dtd-arg t69:hash-table-keys)
+ dict-values-index (prep-dtd-arg t69:hash-table-values)
dict-map!-index t69:hash-table-map!*
dict-filter!-index t69:hash-table-filter!*
dict-filter-index t69:hash-table-filter*
dict-for-each-index t69:hash-table-foreach*
dict-fold-index t69:hash-table-fold*
- dict->alist-index t69:hash-table->alist*
+ dict->alist-index (prep-dtd-arg t69:hash-table->alist)
dict-search-index t69:hash-table-search*
dict-search!-index t69:hash-table-search!*
dict-comparator-index t69:hash-table-comparator*
- dict-copy-index t69:hash-table-copy*)))
+ dict-copy-index (prep-dtd-arg t69:hash-table-copy))))