On Mon, Nov 9, 2009 at 10:20 PM, John Harrop <jharrop...@gmail.com> wrote: > It seems to treat strings as it does vectors, seeing if an index is in > bounds or not. It doesn't treat symbols as anything though. > The clojure.contrib.seq-utils/includes? function gives true for "foo" and
I did not want to make this a discussion about contains? per se, but about the general design philosophy about dealing with type erros (which I think is a bigger issue, IMHO). But it is a bit difficult to avoid noticing that contains? is a bit unintuitive, so to say. Even with vectors (contains? [1 5] 5) being false sounds somewhat strange. I understand the initial intent, like this: (contains? {'a 5} 5) being false But the end result with strings and vectors is a tad unintuitive... Tiago --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---