diff options
| author | 2021-11-13 15:44:38 -0800 | |
|---|---|---|
| committer | 2021-11-13 15:44:38 -0800 | |
| commit | 88bc7f2195e503f35a94011cda141a1ae34feb32 (patch) | |
| tree | efe6be47c0f48544ea8c88207016680c8aee3504 | |
| parent | Merge remote-tracking branch 'upstream/master' (diff) | |
Drop trailing whitespace.
| -rw-r--r-- | srfi-225-test.scm | 70 | ||||
| -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 |
9 files changed, 71 insertions, 71 deletions
diff --git a/srfi-225-test.scm b/srfi-225-test.scm index 68402bc..3630605 100644 --- a/srfi-225-test.scm +++ b/srfi-225-test.scm @@ -85,7 +85,7 @@ (test-equal (length lst) (length expected-keys)) (for-each (lambda (key) - (test-assert (find (lambda (key*) (equal? key key*)) + (test-assert (find (lambda (key*) (equal? key key*)) expected-keys))) lst)))))) @@ -111,14 +111,14 @@ (test-assert (not (dict-contains? dtd (alist->dict '()) 'a))) (test-assert (not (dict-contains? dtd (alist->dict '((b . c))) 'a))) (test-assert (dict-contains? dtd (alist->dict '((a . b))) 'a))) - + (test-group "dict=?" (define dict1 (alist->dict '((a . 1) (b . 2)))) (define dict2 (alist->dict '((b . 2) (a . 1)))) (define dict3 (alist->dict '((a . 1)))) (define dict4 (alist->dict '((a . 2) (b . 2)))) - + (test-assert (dict=? dtd = dict1 dict2)) (test-assert (not (dict=? dtd = dict1 dict3))) (test-assert (not (dict=? dtd = dict3 dict1))) @@ -134,7 +134,7 @@ "dict-ref/default" (test-equal (dict-ref/default dtd (alist->dict '((a . b))) 'a 'c) 'b) (test-equal (dict-ref/default dtd (alist->dict '((a* . b))) 'a 'c) 'c)) - + (when mutable? (test-skip 1)) (test-group @@ -672,13 +672,13 @@ (let ((cmp (dict-comparator dtd (alist->dict '((a . b)))))) (test-assert (or (not cmp) (comparator? cmp))))) - + (test-group "dict-for-each" (test-for-each #t (lambda (proc) - (dict-for-each dtd - proc + (dict-for-each dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) @@ -691,8 +691,8 @@ (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each< dtd - proc + (dict-for-each< dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) @@ -706,105 +706,105 @@ (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each<= dtd - proc + (dict-for-each<= dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) (4 . d))) 3)) '(1 2 3))) - + (test-group "dict-for-each>" (test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '()))) (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each> dtd - proc + (dict-for-each> dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) (4 . d))) 2)) '(3 4))) - + (test-group "dict-for-each>=" (test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '()))) (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each>= dtd - proc + (dict-for-each>= dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) (4 . d))) 2)) '(2 3 4))) - + (test-group "dict-for-each-in-open-interval" (test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '()))) (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each-in-open-interval dtd - proc + (dict-for-each-in-open-interval dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) (4 . d))) 1 4)) '(2 3))) - + (test-group "dict-for-each-in-closed-interval" (test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '()))) (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each-in-closed-interval dtd - proc + (dict-for-each-in-closed-interval dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) (4 . d))) 1 4)) '(1 2 3 4))) - + (test-group "dict-for-each-in-open-closed-interval" (test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '()))) (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each-in-open-closed-interval dtd - proc + (dict-for-each-in-open-closed-interval dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) (4 . d))) 1 4)) '(2 3 4))) - + (test-group "dict-for-each-in-closed-open-interval" (test-for-each (let* ((cmp (dict-comparator dtd (alist->dict '()))) (ordering (and cmp (comparator-ordered? cmp)))) ordering) (lambda (proc) - (dict-for-each-in-closed-open-interval dtd - proc + (dict-for-each-in-closed-open-interval dtd + proc (alist->dict '((1 . a) (2 . b) (3 . c) (4 . d))) 1 4)) '(1 2 3))) - + (test-group "make-dict-generator" (test-for-each #t @@ -812,11 +812,11 @@ (generator-for-each (lambda (entry) (proc (car entry) (cdr entry))) - (make-dict-generator dtd (alist->dict '((1 . a) + (make-dict-generator dtd (alist->dict '((1 . a) (2 . b) (3 . c)))))) '(1 2 3))) - + (test-group "dict-set-accumulator" (define acc (dict-set-accumulator dtd (alist->dict '()))) @@ -824,7 +824,7 @@ (acc (cons 2 'b)) (acc (cons 2 'c)) (test-assert (dict=? dtd equal? (acc (eof-object)) (alist->dict '((1 . a) (2 . c)))))) - + (test-group "dict-adjoin-accumulator" (define acc (dict-adjoin-accumulator dtd (alist->dict '()))) @@ -868,7 +868,7 @@ ;; so that mutating procedures don't fail alist-copy #f - #f) + #f) (test-group "alist dict-comparator" @@ -920,7 +920,7 @@ alist) (t125-hash-table-copy table #f)) (make-default-comparator) - #f))) + #f))) (else)) (cond-expand 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) |
