From 92eeab2815eae6cd9ef22530d2e50fe0a620ec46 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Sun, 9 Jun 2024 05:13:44 +0900 Subject: Initial commit --- algebraic-structs.monoid.make.fold.scm | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 algebraic-structs.monoid.make.fold.scm (limited to 'algebraic-structs.monoid.make.fold.scm') diff --git a/algebraic-structs.monoid.make.fold.scm b/algebraic-structs.monoid.make.fold.scm new file mode 100644 index 0000000..995bae5 --- /dev/null +++ b/algebraic-structs.monoid.make.fold.scm @@ -0,0 +1,4 @@ +(functor ((algebraic-structs monoid make fold) (M (op id)) (F (foldl foldr))) (fold) + (import scheme M F) + + (define (fold x) (foldl op id x))) -- cgit v1.2.3