RosettaCodeData/Task/Remove-duplicate-elements/AppleScript/remove-duplicate-elements.applescript
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

9 lines
190 B
AppleScript

unique({1, 2, 3, "a", "b", "c", 2, 3, 4, "b", "c", "d"})
on unique(x)
set R to {}
repeat with i in x
if i is not in R then set end of R to i's contents
end repeat
return R
end unique