Hi Andy, On Thu, Jun 7, 2012 at 7:54 PM, Andy Coolware <andy.coolw...@gmail.com> wrote: > I was wondering cause we can do all awesome stuff like that: > > user=> (last "abc") > \c > user=> (first "abc") > \a > user=> (map (fn[z] (str z "-")) "abc") > ("a-" "b-" "c-") > > but this renders false > > user=> (coll? "abc") > false
Few thoughts: 1. You're using a type test there. I'd check out the Collections section of the cheatsheet: http://clojure.org/cheatsheet 2. While I would very much expect the type test (coll? seq?) to return false on a string, I would _not_ expect the capability test (sequential?) to return false, and it does for a String. Is this the expected behavior? I would think that any seqable would return true for sequential?. What do we think? Then, at least, you could easily write code that expects to process only seqable things with a simple pre-condition that the argument is sequential?. -- 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