aboutsummaryrefslogtreecommitdiff
path: root/src/interp
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 /src/interp
parentd0bef3fbe5196f2ac1211af52cc48d7d34187d3d (diff)
downloadopen-axiom-8ba169bea0a3e9eed9593bdb4832d71a0f5f19a4.tar.gz
Fix AW/102
* interp/iterator.boot (getIdentity): Properly identity the algebra empty list.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/iterator.boot8
1 files changed, 6 insertions, 2 deletions
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