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

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to