select returns a set, so you need to call seq/vec before calling nth.
user> (nth (seq (clojure.set/select #(zero? (mod % 2)) #{1 2 5 10}))
0)
2
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post
Hi Jose,
> ; trying to get the first element of an unordered set
> (nth (clojure.set/select #(= 0 (mod % 2)) #{1 2 5 10}) 0)
> Why do I get different messages running from the REPL or loading from a clj
> file ?
I tried it from REPL and file using the from source Clojure 1.1.0-
alpha-SNAPSHOT,
a
Hello guys,I've read the Stuart Halloway's book, worked through it, and I've
being programming in clojure in the last few weeks.
I'm using Clojure 1.0.1-alpha-SNAPSHOT with emacs + slime + swank.
Until now, everything went smoothly, however as my code went bigger it
become harder to debug obviousl