aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/indexedp.spad.pamphlet10
-rw-r--r--src/algebra/poly.spad.pamphlet1
2 files changed, 7 insertions, 4 deletions
diff --git a/src/algebra/indexedp.spad.pamphlet b/src/algebra/indexedp.spad.pamphlet
index eb949535..d5c7eade 100644
--- a/src/algebra/indexedp.spad.pamphlet
+++ b/src/algebra/indexedp.spad.pamphlet
@@ -150,8 +150,9 @@ IndexedDirectProductAbelianMonoid(A:AbelianMonoid,S:OrderedSet):
else
res := newcell;
endcell := res
- if empty? x then end := y
- else end := x
+ end :=
+ empty? x => y
+ x
if empty? res then res := end
else qsetrest!(endcell, end)
res
@@ -284,8 +285,9 @@ IndexedDirectProductAbelianGroup(A:AbelianGroup,S:OrderedSet):
else
res := newcell;
endcell := res
- if empty? x then end := - y
- else end := x
+ end :=
+ empty? x => - y
+ x
if empty? res then res := end
else qsetrest!(endcell, end)
res
diff --git a/src/algebra/poly.spad.pamphlet b/src/algebra/poly.spad.pamphlet
index 19ec9808..f311fc97 100644
--- a/src/algebra/poly.spad.pamphlet
+++ b/src/algebra/poly.spad.pamphlet
@@ -162,6 +162,7 @@ PolynomialRing(R:Ring,E:OrderedAbelianMonoid): T == C
res, endcell, newend, xx: Rep
if entireRing? then
for tx in x repeat tx.c := r*tx.c
+ x
else
xx := x
res := empty()