Remove duplicate elements: Difference between revisions
Content added Content deleted
Line 42: | Line 42: | ||
=={{header|AppleScript}}== |
=={{header|AppleScript}}== |
||
<lang applescript> |
<lang applescript>unique({1, 2, 3, "a", "b", "c", 2, 3, 4, "b", "c", "d"}) |
||
⚫ | |||
on unique(x) |
|||
⚫ | |||
⚫ | |||
if i is not in unique then |
|||
⚫ | |||
set end of |
if i is not in R then set end of R to i's contents |
||
end if |
|||
end repeat |
end repeat |
||
return |
return R |
||
end unique</lang> |
|||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |