RosettaCodeData/Task/Remove-duplicate-elements/Oz/remove-duplicate-elements.oz
2023-07-01 13:44:08 -04:00

12 lines
162 B
Text

declare
fun {Nub Xs}
D = {Dictionary.new}
in
for X in Xs do D.X := unit end
{Dictionary.keys D}
end
in
{Show {Nub [1 2 1 3 5 4 3 4 4]}}