diff options
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 |