diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2024-06-12 00:54:11 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2024-06-12 00:54:11 +0900 |
commit | 7e9013fc2ae5d82dfc0b152089c94d6c78e245b3 (patch) | |
tree | 82cd571bb06246e448bd0b6e344e0745e0c5b546 | |
parent | 6d18ea4ce80f312e0c54d3674c49cf623a23d4b3 (diff) |
Rename operator procedure from `op` to `<>`
-rw-r--r-- | algebraic-structures.monoid.list.base.scm | 4 | ||||
-rw-r--r-- | algebraic-structures.monoid.make.fold.scm | 4 | ||||
-rw-r--r-- | algebraic-structures.monoid.make.scm | 4 | ||||
-rw-r--r-- | algebraic-structures.monoid.number.product.base.scm | 4 | ||||
-rw-r--r-- | algebraic-structures.monoid.number.sum.base.scm | 4 | ||||
-rw-r--r-- | tests/run.scm | 6 |
6 files changed, 13 insertions, 13 deletions
diff --git a/algebraic-structures.monoid.list.base.scm b/algebraic-structures.monoid.list.base.scm index b7d7895..900c12e 100644 --- a/algebraic-structures.monoid.list.base.scm +++ b/algebraic-structures.monoid.list.base.scm @@ -1,5 +1,5 @@ -(module (algebraic-structures monoid list base) (op unit) +(module (algebraic-structures monoid list base) (<> unit) (import scheme) - (define op append) + (define <> append) (define unit '())) diff --git a/algebraic-structures.monoid.make.fold.scm b/algebraic-structures.monoid.make.fold.scm index 4a6cce6..0334ab6 100644 --- a/algebraic-structures.monoid.make.fold.scm +++ b/algebraic-structures.monoid.make.fold.scm @@ -1,4 +1,4 @@ -(functor ((algebraic-structures monoid make fold) (M (op unit)) (F (foldl foldr))) (fold) +(functor ((algebraic-structures monoid make fold) (M (<> unit)) (F (foldl foldr))) (fold) (import scheme M F) - (define (fold x) (foldl op unit x))) + (define (fold x) (foldl <> unit x))) diff --git a/algebraic-structures.monoid.make.scm b/algebraic-structures.monoid.make.scm index ef3e8a3..58575ba 100644 --- a/algebraic-structures.monoid.make.scm +++ b/algebraic-structures.monoid.make.scm @@ -1,3 +1,3 @@ -(functor ((algebraic-structures monoid make) (F (op unit))) - (op unit) +(functor ((algebraic-structures monoid make) (F (<> unit))) + (<> unit) (import F)) diff --git a/algebraic-structures.monoid.number.product.base.scm b/algebraic-structures.monoid.number.product.base.scm index fb4a4bc..796a6c9 100644 --- a/algebraic-structures.monoid.number.product.base.scm +++ b/algebraic-structures.monoid.number.product.base.scm @@ -1,5 +1,5 @@ -(module (algebraic-structures monoid number product base) (op unit) +(module (algebraic-structures monoid number product base) (<> unit) (import scheme) - (define op *) + (define <> *) (define unit 1)) diff --git a/algebraic-structures.monoid.number.sum.base.scm b/algebraic-structures.monoid.number.sum.base.scm index 8a7b68e..6fb1c59 100644 --- a/algebraic-structures.monoid.number.sum.base.scm +++ b/algebraic-structures.monoid.number.sum.base.scm @@ -1,5 +1,5 @@ -(module (algebraic-structures monoid number sum base) (op unit) +(module (algebraic-structures monoid number sum base) (<> unit) (import scheme) - (define op +) + (define <> +) (define unit 0)) diff --git a/tests/run.scm b/tests/run.scm index 6c306b5..ed2cd8f 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -74,9 +74,9 @@ (test-begin "monoid.list") -(test '(a b c 1 2 3) (list:op '(a b c) '(1 2 3))) -(test '(a b c x y z 1 2 3) (list:op (list:op '(a b c) '(x y z)) '(1 2 3))) -(test '(a b c x y z 1 2 3) (list:op '(a b c) (list:op '(x y z) '(1 2 3)))) +(test '(a b c 1 2 3) (list:<> '(a b c) '(1 2 3))) +(test '(a b c x y z 1 2 3) (list:<> (list:<> '(a b c) '(x y z)) '(1 2 3))) +(test '(a b c x y z 1 2 3) (list:<> '(a b c) (list:<> '(x y z) '(1 2 3)))) (test-end "monoid.list") |