diff options
| author | 2021-08-26 00:12:45 +0300 | |
|---|---|---|
| committer | 2021-08-26 00:12:45 +0300 | |
| commit | 470b87e3f54d3523d722cf3738d99a8307edd466 (patch) | |
| tree | 37379026929e274972670f6f36b77bdfa2041a87 /srfi/srfi-69-impl.scm | |
| parent | remove old file (diff) | |
add kawa docker test
Diffstat (limited to '')
| -rw-r--r-- | srfi/srfi-69-impl.scm | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/srfi/srfi-69-impl.scm b/srfi/srfi-69-impl.scm index ee619e0..90c3b97 100644 --- a/srfi/srfi-69-impl.scm +++ b/srfi/srfi-69-impl.scm @@ -5,7 +5,7 @@ (lambda (dtd . args) (apply proc args))) - (define (t69:make-hash-table* dtd comparator) + (define (t69-make-hash-table* dtd comparator) (define constructor-args (if (not comparator) '() @@ -14,109 +14,109 @@ (if hash (list pred hash) (list pred))))) - (apply t69:make-hash-table constructor-args)) + (apply t69-make-hash-table constructor-args)) - (define (t69:hash-table-ref* dtd table key fail success) + (define (t69-hash-table-ref* dtd table key fail success) (define default (cons #f #f)) - (define found (t69:hash-table-ref/default table key default)) + (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!* dtd table . obj) (let loop ((obj obj)) (if (null? obj) table (begin - (t69:hash-table-set! table (car obj) (cadr obj)) + (t69-hash-table-set! table (car obj) (cadr obj)) (loop (cddr obj)))))) - (define (t69:hash-table-update!/default* dtd table key proc default) - (t69:hash-table-update!/default table key proc default) + (define (t69-hash-table-update!/default* dtd 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!* dtd table keys) (for-each (lambda (key) - (t69:hash-table-delete! table key)) + (t69-hash-table-delete! table key)) keys) table) - (define (t69:hash-table-foreach* dtd proc table) - (t69:hash-table-walk table proc)) + (define (t69-hash-table-foreach* dtd proc table) + (t69-hash-table-walk table proc)) - (define (t69:hash-table-map!* dtd proc table) - (t69:hash-table-walk table (lambda (key value) - (t69:hash-table-set! table key (proc key value)))) + (define (t69-hash-table-map!* dtd 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) - (t69:hash-table-walk table + (define (t69-hash-table-filter!* dtd proc table) + (t69-hash-table-walk table (lambda (key value) (unless (proc key value) - (t69:hash-table-delete! table key)))) + (t69-hash-table-delete! table key)))) table) - (define (t69:hash-table-filter* dtd proc table) + (define (t69-hash-table-filter* dtd proc table) (dict-filter! dtd proc (dict-copy dtd table))) - (define (t69:hash-table-fold* dtd proc knil table) - (t69:hash-table-fold table proc knil)) + (define (t69-hash-table-fold* dtd proc knil table) + (t69-hash-table-fold table proc knil)) - (define (t69:hash-table-search!* dtd table key fail success) + (define (t69-hash-table-search!* dtd table key fail success) (define (handle-success value) (define (update new-key new-value obj) (unless (eq? new-key key) - (t69:hash-table-delete! table key)) - (t69:hash-table-set! table new-key new-value) + (t69-hash-table-delete! table key)) + (t69-hash-table-set! table new-key new-value) (values table obj)) (define (remove obj) - (t69:hash-table-delete! table key) + (t69-hash-table-delete! table key) (values table obj)) (success key value update remove)) (define (handle-fail) (define (ignore obj) (values table obj)) (define (insert value obj) - (t69:hash-table-set! table key value) + (t69-hash-table-set! table key value) (values table obj)) (fail insert ignore)) (define default (cons #f #f)) - (define found (t69:hash-table-ref/default table key default)) + (define found (t69-hash-table-ref/default table key default)) (if (eq? default found) (handle-fail) (handle-success found))) - (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-search* dtd table key fail success) + (t69-hash-table-search!* dtd (dict-copy dtd table) key fail success)) - (define (t69:hash-table-comparator* dtd table) + (define (t69-hash-table-comparator* dtd table) (make-comparator (lambda args #t) - (or (t69:hash-table-equivalence-function table) + (or (t69-hash-table-equivalence-function table) equal?) #f - (t69:hash-table-hash-function table))) + (t69-hash-table-hash-function table))) (make-dtd - make-dictionary-id t69:make-hash-table* - dictionary?-id (prep-dtd-arg t69:hash-table?) - dict-ref-id t69:hash-table-ref* - dict-ref/default-id (prep-dtd-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-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-map!-id t69:hash-table-map!* - dict-filter!-id t69:hash-table-filter!* - 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-search-id t69:hash-table-search* - dict-search!-id t69:hash-table-search!* - dict-comparator-id t69:hash-table-comparator* - dict-copy-id (prep-dtd-arg t69:hash-table-copy)))) + make-dictionary-id t69-make-hash-table* + dictionary?-id (prep-dtd-arg t69-hash-table?) + dict-ref-id t69-hash-table-ref* + dict-ref/default-id (prep-dtd-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-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-map!-id t69-hash-table-map!* + dict-filter!-id t69-hash-table-filter!* + 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-search-id t69-hash-table-search* + dict-search!-id t69-hash-table-search!* + dict-comparator-id t69-hash-table-comparator* + dict-copy-id (prep-dtd-arg t69-hash-table-copy)))) |
