Let's keep it easy this week as we get back into it.
Write a function called
uniques that takes a sequence of values. That sequence is going to have zero or more unique values. The rest will repeat at least once. Your job is to return the unique values in the same order as they appear in the argument sequence.
(uniques [1 2 3 4 5 6 1 2 3 5 6]) ;=> (4) (uniques [:a :b :c :c]) ;=> (:a :b) (uniques [1 2 3 1 2 3]) ;=> ()
Thanks to this site for the challenge idea where it is considered Medium level in Python.
Email submissions to email@example.com before June 21, 2020. You can discuss the submissions in the comments below.
@tychobrailleur This condition "unique values in the same order as they appear in the argument sequence" is not fulfilled, unfortunately. It would be nice to use
intofor java.util.LinkedHashSet which keeps insertion order, but it does not work.