RosettaCodeData/Task/Remove-duplicate-elements/Oz/remove-duplicate-elements.oz

13 lines
162 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
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]}}