Hi all, I was surprised by the fact that rand-nth thrown when called on an empty collection - see http://dev.clojure.org/jira/browse/CLJ-925
This behaviour is strange, since passing nil to rand-nth returns nil, whereas in my experience, other Clojure functions treat nil and empty collections in the same way (compare with next/rest/first, etc). http://dev.clojure.org/jira/browse/CLJ-925 was marked as Completed without comment – is this the intended behaviour? If so, would you accept a patch to update the docstring to make it clear that the function will throw an exception when passed an empty collection? Thanks, Marc -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.