> To make this concrete, should the following function from > clojure.contrib.seq-utils call seq on its arg? As written, you cannot > call it with an associative collection unless you remember to wrap it > in a seq: > > (defn rand-elt > "Return a random element of this seq" > [s] > (nth s (rand-int (count s)))) > > Maybe focusing too much on your example is missing the point of your e-mail, but I'd say that this function seems to have adequate docstring and implementation : the docstring assumes s is already a seq, so the implementation does not call (seq) on it.
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---