Removing duplicates from a list

Date: Thu Sep 10 08:51:37 MST 1998
From: Kenneth Reese Prat <pratk@planet.eon.net>
Subject: Removing duplicates from a list
> I'm wondering if anyone has any tips or code to help me write a handler
> to strip duplicate list items out of said list.
A solution I've had some success with is to sort the list and then step through it from the end, deleting entries that matched the position one higher.
on stripDupes vlist
   sort vlist
   repeat with i = count(vlist) down to 2
      if getAt(vlist, i) = getAt(vlist, i-1) then deleteAt vlist, i
   end repeat
end