I don't know either, but you can use the following work around
(defn my-seq[object]
(instance? clojure.lang.Seqable object))
(my-seq []) =>true
(my-seq {}) =>true
(my-seq #{}) =>true
(my-seq '()) =>true
(my-seq :a) => false
(my-seq 'a-symbol) => false
Still, it would be nice to know the right way to do this...
On Jun 3, 12:53 pm, CuppoJava <[email protected]> wrote:
> Hi,
> Is there a function that will return true iff calling seq on it's
> argument will not throw an error? I thought it was seq?, but (seq? [1
> 2 3]) returns false.
>
> -Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---