Hi, this will be simplified tremenduously when there is a Seqable protocol. Then satisfies? will do the job.
I'm still thinking when I ever needed seqable?, though. Kind regards Meikel -----Ursprüngliche Nachricht----- Von: Ambrose Bonnaire-Sergeant <abonnaireserge...@gmail.com> An: clojure@googlegroups.com Gesendet: Fr, 08 Jun 2012, 08:58:51 MESZ Betreff: Re: why String is not a collection (of Character) Hi Andy, On Fri, Jun 8, 2012 at 1:44 PM, Andy L <andy.coolw...@gmail.com> wrote: > On 06/07/2012 09:22 PM, Ambrose Bonnaire-Sergeant wrote: > >> Every Seqable is not Sequential. >> >> (sequential? {:a 1}) => false >> > > Is there a simple test for sequable? No. I assume you mean seqable. If it did exist, it would look something like: (defn seqable? "True if (seq a) does not throw an exception" [a] (or (instance? Seqable a) (instance? String a) (instance? java.util.Map a) (.isArray (class a)) ;pseudocode (instance? Iterable a) ...)) Thanks, Ambrose -- 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 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