Jay Fields <j...@jayfields.com> writes: > For a list, it seems like converting the list to a vectoc (via vec) > would be a reasonable solution, though I'm sure there's some side > effect that I haven't considered. Perf would be impacted, but this > doesn't seem like the kind of thing you'd want to do anyway, so having > poor perf wouldn't be the end of the world. At least it wouldn't > exception out.
IMHO, it would be bad if converting lists (and seqs?) to vectors would be done under the hoods. There are high chances that you accidentally pass a seq/list to `contains?` and then suffer from worse performance without actually noticing. E.g. you do something like (contains? (map fuddle blabla) 3) ;; has at least 4 items where you actually wanted to do (contains? (mapv fuddle blabla) 3) ;; has at least 4 items Bye, Tassilo -- -- 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/groups/opt_out.