aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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