diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2024-06-09 05:13:44 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2024-06-09 05:13:44 +0900 |
commit | 92eeab2815eae6cd9ef22530d2e50fe0a620ec46 (patch) | |
tree | 8bfdca868c360846829f7582e12ab77ce843b8eb /algebraic-structs.monoid.make.fold.scm |
Initial commit
Diffstat (limited to 'algebraic-structs.monoid.make.fold.scm')
-rw-r--r-- | algebraic-structs.monoid.make.fold.scm | 4 |
1 files changed, 4 insertions, 0 deletions
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))) |