Re: Union of sets (lists
Re: Union of sets (lists
- Subject: Re: Union of sets (lists
- From: Michelle Steiner <email@hidden>
- Date: Sun, 12 Jan 2003 09:34:57 -0700
On Sunday, January 12, 2003, at 08:18 AM, Kai wrote:
This may have something to do with the original situation, which the
example
wouldn't necessarily indicate. However, if it's not critical which
list is
added to which, it may be worth considering reversing the switch - so
that
the repeat loop is based on the shorter list (thus speeding up the
process)
- perhaps something like this:
*nod* For some reason, I had it in my head that I had to go through
the long list to match against the short list in order to ensure that
all items are covered.
This still assumes that the original lists contain no duplicates within
themselves - otherwise Deivy's point would also need to be considered:
If I recall set theory correctly (and it's been some 40+ years since I
studied it), sets contain only unique items, so there wouldn't be any
duplicates.
I was trying to solve a problem posted on the applscript newsgroup; I
had only the information provided by the original poster. There was
another problem too--intersecting sets--the result is a set containing
items that appear on both sets, eliminating all that appear in only one
set. That was a trivial modification of a working union script, though.
--Michelle
"There's some good in the world, Mr. Frodo, and it's worth fighting
for."
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.