hello
I wanna remove duplicated value in list on clojure?
for example) from ("a" "b" "c" "a") to ("a" "b" "c")
hello
I wanna remove duplicated value in list on clojure?
for example) from ("a" "b" "c" "a") to ("a" "b" "c")
If you don't care about the order, you can simply convert the list to a set:
user=> (set '("a" "b" "c" "a" "lala" "d"))
#{"a" "b" "c" "d" "lala"}
user=> (distinct '(34 56 45 34 56 89 11 4 11 78 11))
(34 56 45 89 11 4 78)