aboutsummaryrefslogtreecommitdiff
path: root/algebraic-structures.monoid.make.fold.scm
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2024-06-11 02:10:37 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2024-06-11 02:10:37 +0900
commit552cd6c999f3e44b13be88e45c4a8cb391eb40cf (patch)
tree15d9cea824cd5627a7c98ba866fb38a1d69457a6 /algebraic-structures.monoid.make.fold.scm
parent53ccad935b368dbccadd6d64bedb9341f34415c3 (diff)
Rename filename from `algebraic-structs` to `algebraic-structures`
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)))