Hello. (nth [] 0) also throws an exception, so it is not so surprising.
As Andreas shows, rand-nth has no not-found, (rand-int 0) always returns 0, and (nth [] 0) throws it. (rand-int n) returns a integer between 0 (inclusive) and n (exclusive), but (m in N && 0 <= m < 0) doesn't exists. rand-nth throws it only if (= (count coll) 0), so not-found is if-coll-is-empty, but is it valid to choose anything from empty? Where is true error? Thanks. -- Name: OGINO Masanori (荻野 雅紀) E-mail: [email protected] -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
