oldk1331
2018-06-11 12:48:50 UTC
optimize 'removeDuplicates!' in ListAggregate
diff --git a/src/algebra/aggcat.spad b/src/algebra/aggcat.spad
index 58c48445..64fae13e 100644
--- a/src/algebra/aggcat.spad
+++ b/src/algebra/aggcat.spad
@@ -2380,8 +2380,7 @@
removeDuplicates! l ==
p := l
while not empty? p repeat
- p := setrest!(p, remove!((x : S) : Boolean +-> x = first p,
- rest p))
+ p := setrest!(p, remove!(first p, rest p))
l
if S has OrderedSet then
diff --git a/src/algebra/aggcat.spad b/src/algebra/aggcat.spad
index 58c48445..64fae13e 100644
--- a/src/algebra/aggcat.spad
+++ b/src/algebra/aggcat.spad
@@ -2380,8 +2380,7 @@
removeDuplicates! l ==
p := l
while not empty? p repeat
- p := setrest!(p, remove!((x : S) : Boolean +-> x = first p,
- rest p))
+ p := setrest!(p, remove!(first p, rest p))
l
if S has OrderedSet then
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.