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