Re: Replacing Axiom Lists with a new list of Items

Jean-Paul Calderone <[email protected]> Sat, 1 Jul 2006 14:57:03 -0400
Newsgroups gmane.comp.python.quotient.dev
Message-ID <20060701185703.29014.139914042.divmod.quotient.18127@ohm>
On Sun, 2 Jul 2006 03:12:30 +0900, Robert Gravina <[email protected]> wrote:
>In Axiom, is there any quick way to update the contents of one List  with 
>the contents of another, so that existing items can be updated,  non 
>existing ones deleted, and new ones added?

In general, it is probably best to avoid axiom.sequence.List.  It was
written as part of an axiom tutorial and it demonstrates various APIs
pretty well, but it doesn't actually perform very well and it usually
does more work than you actually need.

That said, there is no simple efficient way to perform the operation
you describe on any other kind of set or sequence in Axiom.  Iterating
over the elements of the set is the only way to do it.  Ultimately
there may be a better spelling for this, but it's not there yet.

Jean-Paul