aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/list.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-25 13:02:32 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-25 13:02:32 +0000
commit59676ddc602b874061a8acc941f7bb19cd6041f5 (patch)
tree7dfd6316057ba8189605c227f082a55b7643e128 /src/algebra/list.spad.pamphlet
parent094e16ae834eaf254a85781d759e0399a9269fb1 (diff)
downloadopen-axiom-59676ddc602b874061a8acc941f7bb19cd6041f5.tar.gz
* interp/g-opt.boot: Rename %eq to %peq for pointer comparaison.
* interp/g-util.boot: Expand it. * algebra/aggcat.spad.pamphlet: Cleanup. * algebra/any.spad.pamphlet: Likewise. * algebra/boolean.spad.pamphlet: Likewise. * algebra/data.spad.pamphlet: Likewise. * algebra/domain.spad.pamphlet: Likewise. * algebra/files.spad.pamphlet: Likewise. * algebra/laurent.spad.pamphlet: Likewise. * algebra/list.spad.pamphlet: Likewise. * algebra/mappkg.spad.pamphlet: Likewise. * algebra/ore.spad.pamphlet: Likewise. * algebra/padic.spad.pamphlet: Likewise. * algebra/pattern.spad.pamphlet: Likewise. * algebra/sex.spad.pamphlet: Likewise. * algebra/stream.spad.pamphlet: Likewise. * algebra/string.spad.pamphlet: Likewise. * algebra/syntax.spad.pamphlet: Likewise. * algebra/table.spad.pamphlet: Likewise.
Diffstat (limited to 'src/algebra/list.spad.pamphlet')
-rw-r--r--src/algebra/list.spad.pamphlet12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet
index eb0913ef..7290f770 100644
--- a/src/algebra/list.spad.pamphlet
+++ b/src/algebra/list.spad.pamphlet
@@ -57,7 +57,7 @@ IndexedList(S:Type, mn:Integer): Exports == Implementation where
add
import %nil: % from Foreign Builtin
import %makepair: (S,%) -> % from Foreign Builtin
- import %eq: (%,%) -> Boolean from Foreign Builtin
+ import %peq: (%,%) -> Boolean from Foreign Builtin
import %lempty?: % -> Boolean from Foreign Builtin
import %head: % -> S from Foreign Builtin
import %tail: % -> % from Foreign Builtin
@@ -66,7 +66,7 @@ IndexedList(S:Type, mn:Integer): Exports == Implementation where
#x == LENGTH(x)$Lisp
concat(s:S,x:%) == %makepair(s,x)
- eq?(x,y) == %eq(x,y)
+ eq?(x,y) == %peq(x,y)
first x == SPADfirst(x)$Lisp
elt(x,"first") == SPADfirst(x)$Lisp
empty() == %nil
@@ -110,21 +110,21 @@ IndexedList(S:Type, mn:Integer): Exports == Implementation where
-- displays cycle with overbar over the cycle
y := empty()$List(OutputForm)
s := cycleEntry x
- while not %eq(x, s) repeat
+ while not %peq(x, s) repeat
y := concat((first x)::OutputForm, y)
x := rest x
y := reverse! y
empty? s => bracket y
-- cyclic case: z is cylic part
z := list((first x)::OutputForm)
- while not %eq(s, rest x) repeat
+ while not %peq(s, rest x) repeat
x := rest x
z := concat((first x)::OutputForm, z)
bracket concat!(y, overbar commaSeparate reverse! z)
if S has SetCategory then
x = y ==
- %eq(x,y) => true
+ %peq(x,y) => true
while not Qnull x and not Qnull y repeat
%head x ~=$S %head y => return false
x := %tail x
@@ -181,7 +181,7 @@ IndexedList(S:Type, mn:Integer): Exports == Implementation where
merge!(f, p, q) ==
Qnull p => q
Qnull q => p
- %eq(p, q) => error "cannot merge a list into itself"
+ %peq(p, q) => error "cannot merge a list into itself"
if f(%head p, %head q)
then (r := t := p; p := %tail p)
else (r := t := q; q := %tail q)