diff options
Diffstat (limited to 'algebraic-structures.private.list.scm')
-rw-r--r-- | algebraic-structures.private.list.scm | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/algebraic-structures.private.list.scm b/algebraic-structures.private.list.scm new file mode 100644 index 0000000..4710b40 --- /dev/null +++ b/algebraic-structures.private.list.scm @@ -0,0 +1,19 @@ +(module (algebraic-structures private list) (<> unit fold reduce map1) + (import scheme + (rename (only (srfi 1) fold reduce) + (fold srfi:fold) + (reduce srfi:reduce)) + (only (chicken base) assert)) + + (define <> append) + + (define unit '()) + + (define fold srfi:fold) + + (define (reduce f xs) + (assert (not (null? xs))) + (srfi:reduce f #f xs)) + + (define (map1 f xs) + (map f xs))) |