diff -du srfi-42/srfi-42.scm srfi-42-new/srfi-42.scm
old
|
new
|
|
33 | 33 | |
34 | 34 | (module srfi-42 |
35 | 35 | |
36 | | ( do-ec list-ec append-ec string-ec |
| 36 | ( do-ec list-ec (append-ec append*) string-ec |
37 | 37 | string-append-ec vector-ec vector-of-length-ec |
38 | 38 | sum-ec product-ec min-ec max-ec any?-ec |
39 | 39 | every?-ec first-ec last-ec fold-ec fold3-ec |
… |
… |
|
892 | 892 | (define-syntax append-ec |
893 | 893 | (syntax-rules () |
894 | 894 | ((append-ec etc1 etc ...) |
895 | | (apply append (list-ec etc1 etc ...)) ))) |
| 895 | (append* (list-ec etc1 etc ...)) ))) |
| 896 | |
| 897 | ;; Copied from srfi-1, changed to accept only one argument: |
| 898 | (define (append* lists) |
| 899 | (if (pair? lists) |
| 900 | (let recur ((list1 (car lists)) (lists (cdr lists))) |
| 901 | (if (pair? lists) |
| 902 | (let ((tail (recur (car lists) (cdr lists)))) |
| 903 | (fold-right cons tail list1)) ; Append LIST1 & TAIL. |
| 904 | list1)) |
| 905 | '())) |
| 906 | |
896 | 907 | |
897 | 908 | (define-syntax string-ec |
898 | 909 | (syntax-rules () |