ok, the following works as expected. user> (separate (fn [n] (= n 2)) '(1 2 3 4 5)) [(2) (1 3 4 5)]
now, I want to randomly select a number from '(1 2 3 4 5), I change the function to the following, and the result is NOT expected. user> (separate (fn [n] (= n (inc (int (rand 5))))) '(1 2 3 4 5)) [() (2 3 4)] Is it a bug in the separate function or do I use it incorrectly? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en