I try to make this assigment :
Write the function
(contains-duplicates? sequence) that takes a sequence as a parameter and returns
true if
sequence contains some element multiple times. Otherwise it returns
false.
So I did this :
(defn contains-duplicates? [a-seq]
(let [element (fn element [a-seq] (count a-seq) )]
(= (map element a-seq)1)))
But then I see this message : UnsupportedOperationException count not supported on this type: Long clojure.lang.RT.countFrom (RT.java:556)
When I change map to apply I see this message : ArityException Wrong number of args (5) passed to: structured-data$contains-duplicates-QMARK-$element clojure.lang.AFn.throwArity (AFn.java:437)
Where did I misunderstood this page :
http://iloveponies.github.io/120-hour-epic-sax-marathon/structured-data.htmlRoelof