aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/lmdict.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/lmdict.spad.pamphlet')
-rw-r--r--src/algebra/lmdict.spad.pamphlet26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/algebra/lmdict.spad.pamphlet b/src/algebra/lmdict.spad.pamphlet
index 1d8cc8a1..edadf2f2 100644
--- a/src/algebra/lmdict.spad.pamphlet
+++ b/src/algebra/lmdict.spad.pamphlet
@@ -61,7 +61,7 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
dictionary(ls:List S):% ==
empty? ls => empty()
lmd := empty()
- for x in ls repeat insert_!(x,lmd)
+ for x in ls repeat insert!(x,lmd)
lmd
if S has ConvertibleTo InputForm then
@@ -70,18 +70,18 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
convert(parts lmd)@InputForm]
map(f, s) == dictionary map(f, parts s)
- map_!(f, s) == dictionary map_!(f, parts s)
+ map!(f, s) == dictionary map!(f, parts s)
parts s == deref s
sub(x, y, z) == (z = x => y; z)
- insert_!(x, s, n) == (for i in 1..n repeat insert_!(x, s); s)
+ insert!(x, s, n) == (for i in 1..n repeat insert!(x, s); s)
substitute(x, y, s) == dictionary map(sub(x, y, #1), parts s)
- removeDuplicates_! s == dictionary removeDuplicates_! parts s
+ removeDuplicates! s == dictionary removeDuplicates! parts s
inspect s ==
empty? s => error "empty dictionary"
first parts s
- extract_! s ==
+ extract! s ==
empty? s => error "empty dictionary"
x := first(p := parts s)
setref(s, rest p)
@@ -96,11 +96,11 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
q := rest q
false
- remove_!(p: S->Boolean, lmd:%):% ==
- for x in removeDuplicates parts lmd | p(x) repeat remove_!(x,lmd)
+ remove!(p: S->Boolean, lmd:%):% ==
+ for x in removeDuplicates parts lmd | p(x) repeat remove!(x,lmd)
lmd
- select_!(p: S->Boolean, lmd:%):% == remove_!(not p(#1), lmd)
+ select!(p: S->Boolean, lmd:%):% == remove!(not p(#1), lmd)
duplicates(lmd:%):List D ==
ld: List D := empty()
@@ -112,7 +112,7 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
if S has OrderedSet then
s = t == parts s = parts t
- remove_!(x:S, s:%) ==
+ remove!(x:S, s:%) ==
p := deref s
while not empty? p and x = first p repeat p := rest p
setref(s, p)
@@ -123,7 +123,7 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
p.rest := q
s
- insert_!(x, s) ==
+ insert!(x, s) ==
p := deref s
empty? p or x < first p =>
setref(s, concat(x, p))
@@ -134,17 +134,17 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
s
else
- remove_!(x:S, s:%) == (setref(s, remove_!(x, parts s)); s)
+ remove!(x:S, s:%) == (setref(s, remove!(x, parts s)); s)
s = t ==
a := copy s
while not empty? a repeat
x := inspect a
count(x, s) ~= count(x, t) => return false
- remove_!(x, a)
+ remove!(x, a)
true
- insert_!(x, s) ==
+ insert!(x, s) ==
p := deref s
while not empty? p repeat
x = first p =>