Hi Tom, Yes, this is exactly what I was looking for. Nevertheless, the above solutions of Rene & Tamas provide a lot of useful tips. Thanks a lot guys!
Jan Dňa streda, 29. apríla 2015 15:47:38 UTC+2 Tom Breloff napísal(-a): > > This may not be the most efficient, but is it what you were looking for? > > A = ASCIIString["a","b","c","a","d","b"] > u = Set(A) > B = ASCIIString[] > for a in A > if a in u > delete!(u,a) > else > push!(B,a) > end > end > # now B == ["a","b"] > > On Wednesday, April 29, 2015 at 9:14:57 AM UTC-4, Ján Dolinský wrote: >> >> Hi, >> >> I am trying to find all duplicates in an iterable collection e.g. of >> strings. >> >> A = String["a", "b", "c", "a", "d", "b"] >> >> Function unique(A) will return the unique elements. How can I find the >> remaining duplicates ? I tried setdiff(A, unique(A)) but it works in a >> different way. >> >> Thanks , >> Jan >> >