aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/aggcat.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-12 19:17:32 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-12 19:17:32 +0000
commitc93e84048964194e5674e859d6bd8827010f09f6 (patch)
tree407ca23d232bf3f974550fce0175c49495ef49c0 /src/algebra/aggcat.spad.pamphlet
parent52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 (diff)
downloadopen-axiom-c93e84048964194e5674e859d6bd8827010f09f6.tar.gz
* src/algebra/: Systematically use negative? when comparing for
greater than 0.
Diffstat (limited to 'src/algebra/aggcat.spad.pamphlet')
-rw-r--r--src/algebra/aggcat.spad.pamphlet8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet
index 8e9a0b23..e58fac69 100644
--- a/src/algebra/aggcat.spad.pamphlet
+++ b/src/algebra/aggcat.spad.pamphlet
@@ -1565,17 +1565,17 @@ UnaryRecursiveAggregate(S:Type): Category == RecursiveAggregate S with
less?(l, n) ==
i := n::Integer
- while i > 0 and not empty? l repeat (l := rest l; i := i - 1)
- i > 0
+ while positive? i and not empty? l repeat (l := rest l; i := i - 1)
+ positive? i
more?(l, n) ==
i := n::Integer
- while i > 0 and not empty? l repeat (l := rest l; i := i - 1)
+ while positive? i and not empty? l repeat (l := rest l; i := i - 1)
zero?(i) and not empty? l
size?(l, n) ==
i := n::Integer
- while not empty? l and i > 0 repeat (l := rest l; i := i - 1)
+ while not empty? l and positive? i repeat (l := rest l; i := i - 1)
empty? l and zero? i
#x ==