diff options
author | dos-reis <gdr@axiomatics.org> | 2008-01-22 01:01:51 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-01-22 01:01:51 +0000 |
commit | 8ba169bea0a3e9eed9593bdb4832d71a0f5f19a4 (patch) | |
tree | 6a3f61d8e4d15f90f501ecf21bce032b9ea8bf9a /src/interp | |
parent | d0bef3fbe5196f2ac1211af52cc48d7d34187d3d (diff) | |
download | open-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.boot | 8 |
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 |