summaryrefslogtreecommitdiffstats
path: root/srfi/default-impl.scm
diff options
context:
space:
mode:
authorGravatar Arvydas Silanskas 2021-08-19 01:22:35 +0300
committerGravatar Arvydas Silanskas 2021-08-19 01:22:35 +0300
commit4c0820fa1b45ef4ea6976e950003fc48a70f4075 (patch)
treebb744fd21eb5e7c135f1305075c1724ef82e9d38 /srfi/default-impl.scm
parentmapping implementation (diff)
update spec; fix default copy
Diffstat (limited to 'srfi/default-impl.scm')
-rw-r--r--srfi/default-impl.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/srfi/default-impl.scm b/srfi/default-impl.scm
index 649b6be..4253f6a 100644
--- a/srfi/default-impl.scm
+++ b/srfi/default-impl.scm
@@ -219,9 +219,12 @@
(default-dict-remove* dtd dict-filter! pred dictionary))
(define (default-dict-copy dtd dictionary)
- (dict-map dtd
- (lambda (key value) value)
- dictionary))
+ (define dict (make-dictionary (dict-comparator dtd dictionary)))
+ (dict-for-each dtd
+ (lambda (key value)
+ (set! dict (dict-set! dtd key value)))
+ dictionary)
+ dict)
(define (default-dict-count dtd pred dictionary)
(dict-fold dtd