aboutsummaryrefslogtreecommitdiff
path: root/algebraic-structures.monoid.fold.scm
diff options
context:
space:
mode:
Diffstat (limited to 'algebraic-structures.monoid.fold.scm')
-rw-r--r--algebraic-structures.monoid.fold.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/algebraic-structures.monoid.fold.scm b/algebraic-structures.monoid.fold.scm
new file mode 100644
index 0000000..b18c03c
--- /dev/null
+++ b/algebraic-structures.monoid.fold.scm
@@ -0,0 +1,4 @@
+(functor ((algebraic-structures monoid fold) (M (<> unit)) (F (foldl foldr))) (fold)
+ (import scheme M F)
+
+ (define (fold x) (foldl <> unit x)))