diff options
| author | 2022-02-15 14:13:27 +0200 | |
|---|---|---|
| committer | 2022-02-15 14:13:27 +0200 | |
| commit | fd3fcee4477de39c74ec4c88964d671bf43fd071 (patch) | |
| tree | c71eaea1223060db846dcd40e34ae29c5a4153e5 /srfi/srfi-146-hash-impl.scm | |
| parent | Merge branch 'master' of https://github.com/johnwcowan/srfi-225 (diff) | |
update implementation
Diffstat (limited to 'srfi/srfi-146-hash-impl.scm')
| -rw-r--r-- | srfi/srfi-146-hash-impl.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/srfi/srfi-146-hash-impl.scm b/srfi/srfi-146-hash-impl.scm index 822fe7f..609fce9 100644 --- a/srfi/srfi-146-hash-impl.scm +++ b/srfi/srfi-146-hash-impl.scm @@ -4,6 +4,11 @@ (define (prep-dto-arg proc) (lambda (dto . args) (apply proc args))) + + (define (hashmap-map* dto proc dict) + (hashmap-map (lambda (key value) + (values key (proc key value))) + (dict-comparator dto dict) dict)) (define (hashmap-find-update* dto dict key failure success) (call/cc @@ -38,7 +43,8 @@ (make-dto dictionary?-id (prep-dto-arg hashmap?) - dict-mutable?-id (lambda _ #f) + dict-pure?-id (lambda _ #t) + dict-map-id hashmap-map* dict-empty?-id (prep-dto-arg hashmap-empty?) dict-contains?-id (prep-dto-arg hashmap-contains?) dict-ref-id (prep-dto-arg hashmap-ref) @@ -56,7 +62,6 @@ dict-remove-id (prep-dto-arg hashmap-remove) dict-find-update-id hashmap-find-update* dict-size-id (prep-dto-arg hashmap-size) - dict-for-each-id (prep-dto-arg hashmap-for-each) dict-count-id (prep-dto-arg hashmap-count) dict-keys-id (prep-dto-arg hashmap-keys) dict-values-id (prep-dto-arg hashmap-values) |
