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.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