diff options
| author | 2021-11-18 17:28:16 -0500 | |
|---|---|---|
| committer | 2021-11-18 17:28:16 -0500 | |
| commit | 2e1d7fd3beb4f1e01b041d1d85bf4a70e72eab89 (patch) | |
| tree | 4aba3f4b7f13642b2f065aaf562d29ae0663b2bc /srfi | |
| parent | MN-W review (diff) | |
| parent | Publish fifth draft. (diff) | |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'srfi')
| -rw-r--r-- | srfi/225.sld | 2 | ||||
| -rw-r--r-- | srfi/alist-impl.scm | 2 | ||||
| -rw-r--r-- | srfi/default-impl.scm | 48 | ||||
| -rw-r--r-- | srfi/srfi-125-impl.scm | 4 | ||||
| -rw-r--r-- | srfi/srfi-126-impl.scm | 2 | ||||
| -rw-r--r-- | srfi/srfi-146-hash-impl.scm | 6 | ||||
| -rw-r--r-- | srfi/srfi-146-impl.scm | 6 | ||||
| -rw-r--r-- | srfi/srfi-69-impl.scm | 2 |
8 files changed, 36 insertions, 36 deletions
diff --git a/srfi/225.sld b/srfi/225.sld index a410b62..1d34430 100644 --- a/srfi/225.sld +++ b/srfi/225.sld @@ -75,7 +75,7 @@ dict-for-each-in-closed-interval dict-for-each-in-open-closed-interval dict-for-each-in-closed-open-interval - + ;; generator procedures make-dict-generator dict-set-accumulator diff --git a/srfi/alist-impl.scm b/srfi/alist-impl.scm index 4400602..e2b2a29 100644 --- a/srfi/alist-impl.scm +++ b/srfi/alist-impl.scm @@ -4,7 +4,7 @@ (and (list? l) (or (null? l) (pair? (car l))))) - + (define (alist-mutable? dtd alist) #f) diff --git a/srfi/default-impl.scm b/srfi/default-impl.scm index 72c1f7f..a0c9584 100644 --- a/srfi/default-impl.scm +++ b/srfi/default-impl.scm @@ -12,27 +12,27 @@ (define default-dict-mutable? (not-implemented "dict-mutable?")) (define default-dict-size (not-implemented "dict-size")) (define default-dict-alter (not-implemented "dict-alter")) - + (define (dict-alter* dtd dict key fail success) (if (dict-mutable? dtd dict) (dict-alter! dtd dict key fail success) (dict-alter dtd dict key fail success))) - + (define (dict-delete-all* dtd dict keys) (if (dict-mutable? dtd dict) (dict-delete-all! dtd dict keys) (dict-delete-all dtd dict keys))) - + (define (dict-update* dtd dict key updater fail success) (if (dict-mutable? dtd dict) (dict-update! dtd dict key updater fail success) (dict-update dtd dict key updater fail success))) - + (define (dict-filter* dtd pred dictionary) (if (dict-mutable? dtd dictionary) (dict-filter! dtd pred dictionary) (dict-filter dtd pred dictionary))) - + (define (dict-replace* dtd dict key val) (if (dict-mutable? dtd dict) (dict-replace! dtd dict key val) @@ -40,7 +40,7 @@ (define (default-dict-empty? dtd dictionary) (= 0 (dict-size dtd dictionary))) - + (define (default-dict=? dtd = dict1 dict2) (define (check-entries* keys) (cond @@ -59,7 +59,7 @@ (define (default-dict-contains? dtd dictionary key) (dict-ref dtd dictionary key - (lambda () #f) + (lambda () #f) (lambda (x) #t))) (define (default-dict-ref dtd dictionary key failure success) @@ -73,7 +73,7 @@ (dict-ref dtd dictionary key (lambda () default) (lambda (x) x))) - + ;; private (define (default-dict-set* dtd dictionary use-old? objs) (let loop ((objs objs) @@ -266,66 +266,66 @@ dictionary)) (define default-dict-comparator (not-implemented "dict-comparator")) - + (define default-dict-for-each (not-implemented "dict-for-each")) - + (define (default-dict-for-each/filtered dtd pred proc dict) - (dict-for-each dtd + (dict-for-each dtd (lambda (key value) (when (pred key) (proc key value))) dict)) - + (define (default-dict-for-each< dtd proc dict key) (define cmp (dict-comparator dtd dict)) (define (pred k) (<? cmp k key)) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-dict-for-each<= dtd proc dict key) (define cmp (dict-comparator dtd dict)) (define (pred k) (<=? cmp k key)) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-dict-for-each> dtd proc dict key) (define cmp (dict-comparator dtd dict)) (define (pred k) (>? cmp k key)) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-dict-for-each>= dtd proc dict key) (define cmp (dict-comparator dtd dict)) (define (pred k) (>=? cmp k key)) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-dict-for-each-in-open-interval dtd proc dict key1 key2) (define cmp (dict-comparator dtd dict)) (define (pred k) (<? cmp key1 k key2)) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-dict-for-each-in-closed-interval dtd proc dict key1 key2) (define cmp (dict-comparator dtd dict)) (define (pred k) (<=? cmp key1 k key2)) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-dict-for-each-in-open-closed-interval dtd proc dict key1 key2) (define cmp (dict-comparator dtd dict)) (define (pred k) (and (<? cmp key1 k) (<=? cmp k key2))) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-dict-for-each-in-closed-open-interval dtd proc dict key1 key2) (define cmp (dict-comparator dtd dict)) (define (pred k) (and (<=? cmp key1 k) (<? cmp k key2))) (default-dict-for-each/filtered dtd pred proc dict)) - + (define (default-make-dict-generator dtd dict) (define-values (keys vals) (dict-entries dtd dict)) @@ -337,18 +337,18 @@ (set! keys (cdr keys)) (set! vals (cdr vals)) (cons key value))))) - + (define (default-dict-accumulator dtd dict acc-proc) (lambda (arg) (if (eof-object? arg) dict (set! dict (acc-proc dtd dict (car arg) (cdr arg)))))) - + (define (default-dict-set-accumulator dtd dict) (if (dict-mutable? dtd dict) (default-dict-accumulator dtd dict dict-set!) (default-dict-accumulator dtd dict dict-set))) - + (define (default-dict-adjoin-accumulator dtd dict) (if (dict-mutable? dtd dict) (default-dict-accumulator dtd dict dict-adjoin!) @@ -390,7 +390,7 @@ dict-map->list-id default-dict-map->list dict->alist-id default-dict->alist dict-comparator-id default-dict-comparator - + dict-for-each-id default-dict-for-each dict-for-each<-id default-dict-for-each< dict-for-each<=-id default-dict-for-each<= diff --git a/srfi/srfi-125-impl.scm b/srfi/srfi-125-impl.scm index 5705613..9ac64d7 100644 --- a/srfi/srfi-125-impl.scm +++ b/srfi/srfi-125-impl.scm @@ -12,7 +12,7 @@ body ... (let ((table (t125-hash-table-copy table #f))) final-expr)))))) - + (define (t125-hash-table-mutable?* dtd table) (t125-hash-table-mutable? table)) @@ -55,7 +55,7 @@ (define (t125-hash-table-map* dtd proc table) (guard-immutable table - (t125-hash-table-map! proc table) + (t125-hash-table-map! proc table) table)) (define (t125-hash-table-filter* dtd proc table) diff --git a/srfi/srfi-126-impl.scm b/srfi/srfi-126-impl.scm index d5de302..bb55941 100644 --- a/srfi/srfi-126-impl.scm +++ b/srfi/srfi-126-impl.scm @@ -16,7 +16,7 @@ (define (prep-dtd-arg proc) (lambda (dtd . args) (apply proc args))) - + (define (t126-hashtable-ref* dtd table key fail success) (define-values (value found?) (t126-hashtable-lookup table key)) (if found? diff --git a/srfi/srfi-146-hash-impl.scm b/srfi/srfi-146-hash-impl.scm index a86fd03..fb8497e 100644 --- a/srfi/srfi-146-hash-impl.scm +++ b/srfi/srfi-146-hash-impl.scm @@ -4,7 +4,7 @@ (define (prep-dtd-arg proc) (lambda (dtd . args) (apply proc args))) - + (define (hashmap-alter* dtd dict key failure success) (call/cc ;; escape from whole hashmap-search entirely, when success / failure @@ -17,7 +17,7 @@ ;; handle when continuation procedure is called ;; and force it into tail call (call/cc (lambda (k2) - (define result + (define result ;; calls to insert / ignore / update / remove ;; can return unspecified amount of values, ;; hence call-with-values approach @@ -28,7 +28,7 @@ (lambda (key value update remove) (call/cc (lambda (k2) (define result - (success + (success key value (lambda (new-key new-value) (call-with-values (lambda () (update new-key new-value #f)) k2)) diff --git a/srfi/srfi-146-impl.scm b/srfi/srfi-146-impl.scm index a5d3aa6..b504e5f 100644 --- a/srfi/srfi-146-impl.scm +++ b/srfi/srfi-146-impl.scm @@ -4,7 +4,7 @@ (define (prep-dtd-arg proc) (lambda (dtd . args) (apply proc args))) - + (define (mapping-alter* dtd dict key failure success) (call/cc ;; escape from whole hashmap-search entirely, when success / failure @@ -17,7 +17,7 @@ ;; handle when continuation procedure is called ;; and force it into tail call (call/cc (lambda (k2) - (define result + (define result ;; calls to insert / ignore / update / remove ;; can return unspecified amount of values, ;; hence call-with-values approach @@ -28,7 +28,7 @@ (lambda (key value update remove) (call/cc (lambda (k2) (define result - (success + (success key value (lambda (new-key new-value) (call-with-values (lambda () (update new-key new-value #f)) k2)) diff --git a/srfi/srfi-69-impl.scm b/srfi/srfi-69-impl.scm index fe4edf3..734c6b4 100644 --- a/srfi/srfi-69-impl.scm +++ b/srfi/srfi-69-impl.scm @@ -4,7 +4,7 @@ (define (prep-dtd-arg proc) (lambda (dtd . args) (apply proc args))) - + (define (t69-hash-table-mutable?* dtd table) #t) |
