aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-01-22 01:01:51 +0000
committerdos-reis <gdr@axiomatics.org>2008-01-22 01:01:51 +0000
commit8ba169bea0a3e9eed9593bdb4832d71a0f5f19a4 (patch)
tree6a3f61d8e4d15f90f501ecf21bce032b9ea8bf9a
parentd0bef3fbe5196f2ac1211af52cc48d7d34187d3d (diff)
downloadopen-axiom-8ba169bea0a3e9eed9593bdb4832d71a0f5f19a4.tar.gz
Fix AW/102
* interp/iterator.boot (getIdentity): Properly identity the algebra empty list.
-rw-r--r--src/ChangeLog7
-rw-r--r--src/interp/iterator.boot8
2 files changed, 13 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a574d36e..8a3433ae 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,11 @@
2008-01-21 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ Waldek Hebisch <hebisch@math.uni.wroc.pl>
+
+ Fix AW/102
+ * interp/iterator.boot (getIdentity): Properly identity the
+ algebra empty list.
+
+2008-01-21 Gabriel Dos Reis <gdr@cs.tamu.edu>
Apply patch byStephen Wilson <<wilsons@multiboard.com>
Fix AW/370
diff --git a/src/interp/iterator.boot b/src/interp/iterator.boot
index 5431b3d9..ff88a8e8 100644
--- a/src/interp/iterator.boot
+++ b/src/interp/iterator.boot
@@ -74,9 +74,13 @@ compReduce1(form is ["REDUCE",op,.,collectForm],m,e,$formalArgList) ==
[untilCode,.,e]:= comp($until,$Boolean,e)
finalCode:= substitute(["UNTIL",untilCode],'$until,finalCode)
[finalCode,m,e]
-
+
+++ returns the identity element of the `reduction' operation `x'
+++ over a list -- a monoid homomorphism.
getIdentity(x,e) ==
- GETL(x,"THETA") is [y] => y
+ -- The empty list should be indicated by name, not by its
+ -- object representation.
+ GETL(x,"THETA") is [y] => (y => y; "nil")
numberize x ==
x=$Zero => 0