Welcome to the CHICKEN Scheme pasting service
transducers error pasted by siiky on Mon Nov 13 11:09:44 2023
-- testing (transducers mappings) ---------------------------------------- -- testing (transducers mappings) - mappings ------------------------- sample mapping can be expressed as equivalent alist. ......... [ PASS] sample mapping transduces to equivalent alist. ............... [ERROR] Error: (null-list?) bad argument type - not a list: #<srfi-146#<mapping>> (transduce mapping-fold values (collect-list) m) sample mapping transduces to equivalent reverse-alist. ....... [ERROR] Error: (null-list?) bad argument type - not a list: #<srfi-146#<mapping>> (transduce reverse-mapping-fold values (collect-list) m) flattening mappings into list produces expected alist. ....... [ERROR] Error: (null-list?) bad argument type - not a list: #<srfi-146#<mapping>> (transduce list-fold flatten-mapping (collect-list) (list m m)) collecting enumerated list into mapping. ..................... [ PASS] chaining mappings produces expected alist. ................... [ERROR] Error: (null-list?) bad argument type - not a list: #<srfi-146#<mapping>> (transduce mapping-fold (chain-mapping (mapping (make-default-comparator) 2 'c 3 'd)) (collect-list) (mapping (make-default-comparator) 0 'a 1 'b)) chaining mappings in reverse produces expected alist. ........ [ERROR] Error: (null-list?) bad argument type - not a list: #<srfi-146#<mapping>> (transduce mapping-fold (chain-reverse-mapping (mapping (make-default-comparator) 2 'c 3 'd)) (collect-list) (mapping (make-default-comparator) 0 'a 1 'b)) interleaving mapping produces expected alist. ................ [ERROR] Error: (null-list?) bad argument type - not a list: #<srfi-146#<mapping>> (transduce mapping-fold (interleave-mapping (mapping (make-default-comparator) 2 'c 3 'd)) (collect-list) (mapping (make-default-comparator) 0 'a 1 'b)) zipping mapping produces expected alist. ..................... [ PASS] 9 tests completed in 0.001 seconds. 6 errors (667/10%). 3 out of 9 (333/10%) tests passed. -- done testing (transducers mappings) - mappings -------------------- -- testing (transducers mappings) - hashmaps ------------------------- sample hashmap can be expressed as equivalent sorted list. ... [ PASS] hashmap can be expressed as equivalent sorted list. .......... [ PASS] flattening hashmap into list produces expected alist. ........ [ PASS] chaining hashmap onto list produces expected alist. .......... [ PASS] 4 tests completed in 0.0 seconds. 4 out of 4 (100%) tests passed. -- done testing (transducers mappings) - hashmaps -------------------- 2 subgroups completed in 0.001 seconds. 1 out of 2 (50%) subgroup passed. -- done testing (transducers mappings) -----------------------------------
transducers '#' -> ':' added by siiky on Mon Nov 13 20:34:29 2023
diff --git a/transducers/0.5.3/src/transducers.mappings.sld b/transducers/0.5.3/src/transducers.mappings.sld index 7b67bb01..86220c29 100644 --- a/transducers/0.5.3/src/transducers.mappings.sld +++ b/transducers/0.5.3/src/transducers.mappings.sld @@ -25,10 +25,10 @@ (scheme case-lambda) (srfi 128) (rename (srfi 146) - (mapping-fold srfi-146#mapping-fold) - (mapping-fold/reverse srfi-146#mapping-fold/reverse)) + (mapping-fold srfi-146:mapping-fold) + (mapping-fold/reverse srfi-146:mapping-fold/reverse)) (rename (srfi 146 hash) - (hashmap-fold srfi-146#hashmap-fold)) + (hashmap-fold srfi-146:hashmap-fold)) (transducers base)) (cond-expand @@ -79,7 +79,7 @@ ;; taking the result of the reducer as the new sentinel value each time. (define (mapping-fold f sentinel xs) (call/cc (lambda (cc) - (srfi-146#mapping-fold + (srfi-146:mapping-fold (lambda (key value s) (let ((result (f s (cons key value)))) (if (reduced? result) @@ -93,7 +93,7 @@ ;; Operates in the reverse order of the items compared to mapping-fold. (define (reverse-mapping-fold f sentinel xs) (call/cc (lambda (cc) - (srfi-146#mapping-fold/reverse + (srfi-146:mapping-fold/reverse (lambda (key value s) (let ((result (f s (cons key value)))) (if (reduced? result) @@ -109,7 +109,7 @@ ;; taking the result of the reducer as the new sentinel value each time. (define (hashmap-fold f sentinel xs) (call/cc (lambda (cc) - (srfi-146#hashmap-fold + (srfi-146:hashmap-fold (lambda (key value s) (let ((result (f s (cons key value)))) (if (reduced? result)