Re: Eliminating duplicate items from a list
Re: Eliminating duplicate items from a list
- Subject: Re: Eliminating duplicate items from a list
- From: "Mark J. Reed" <email@hidden>
- Date: Tue, 4 Sep 2007 09:07:58 -0400
Now that I'm more awake/caffeinated, it occurs to me that AS will
happily do the inner loop for you:
set uniqueList to {}
repeat with origItemRef in origList
set origItem to contents of origItemRef
if uniqueList does not contain origItem then
set end of uniqueList to origItem
end
end
Which doesn't change the runtime, but does make it simpler to write.
Don't get me started on the need to explicitly dereference elements
obtained via "repeat with...in", though. :)
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden