aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-11-26 20:11:59 +0000
committerdos-reis <gdr@axiomatics.org>2011-11-26 20:11:59 +0000
commitb91436e16c46bb3c8b0fa22d4f81eb8743f6cbd7 (patch)
tree94aa152472dbe57557213cb97bc466ef875a125a /src/algebra
parentd80f7180b482bb3f61954d1260aad9a9fac81fa7 (diff)
downloadopen-axiom-b91436e16c46bb3c8b0fa22d4f81eb8743f6cbd7.tar.gz
* algebra/indexedp.spad.pamphlet: Avoid direct use or RPLACD.
* algebra/poly.spad.pamphlet: Likewise. * interp/define.boot (spadCompileOrSetq): Tidy replacement info. * interp/i-output.boot ($BinaryOperators): New. (binaryInfix?): Tidy.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/indexedp.spad.pamphlet10
-rw-r--r--src/algebra/poly.spad.pamphlet5
2 files changed, 12 insertions, 3 deletions
diff --git a/src/algebra/indexedp.spad.pamphlet b/src/algebra/indexedp.spad.pamphlet
index 1b60ecc4..d17d342c 100644
--- a/src/algebra/indexedp.spad.pamphlet
+++ b/src/algebra/indexedp.spad.pamphlet
@@ -132,8 +132,11 @@ IndexedDirectProductAbelianMonoid(A:AbelianMonoid,S:OrderedType):
0 == nil$List(Term) pretend %
zero? x == null terms x
+ import %tail: List Term -> List Term from Foreign Builtin
+
qsetrest!: (List Term, List Term) -> List Term
- qsetrest!(l, e) == RPLACD(l, e)$Lisp
+ qsetrest!(l, e) ==
+ %store(%tail l,e)$Foreign(Builtin)
-- PERFORMANCE CRITICAL; Should build list up
-- by merging 2 sorted lists. Doing this will
@@ -285,8 +288,11 @@ IndexedDirectProductAbelianGroup(A:AbelianGroup,S:OrderedType):
[[termIndex u,a] for u in terms x
| not zero?(a := n * termValue u)] pretend %
+ import %tail: List Term -> List Term from Foreign Builtin
+
qsetrest!: (List Term, List Term) -> List Term
- qsetrest!(l, e) == RPLACD(l, e)$Lisp
+ qsetrest!(l, e) ==
+ %store(%tail l,e)$Foreign(Builtin)
x - y ==
x' := terms x
diff --git a/src/algebra/poly.spad.pamphlet b/src/algebra/poly.spad.pamphlet
index b86755a0..aeca4bf1 100644
--- a/src/algebra/poly.spad.pamphlet
+++ b/src/algebra/poly.spad.pamphlet
@@ -151,8 +151,11 @@ PolynomialRing(R:Ring,E:OrderedAbelianMonoid): T == C
ground?(p): Boolean == empty? p or (empty? rest p and zero? degree p)
+ import %tail: Rep -> Rep from Foreign Builtin
+
qsetrest!: (Rep, Rep) -> Rep
- qsetrest!(l: Rep, e: Rep): Rep == RPLACD(l, e)$Lisp
+ qsetrest!(l: Rep, e: Rep): Rep ==
+ %store(%tail l,e)$Foreign(Builtin)
entireRing? := R has EntireRing