clojure.core/seq?
([x])
Return true if x implements ISeq
(seq? []) => false
because...
(instance? clojure.lang.ISeq []) => false
Vectors do not implement ISeq. That's all the seq? predicate cares about.
But vectors are `seqable?`:
clojure.core/seqable?
([x])
Return true if the seq function is supported for x
(seqable? []) => true
Colloquially, it is normal to refer to any seqable collection as a "seq".
On Tuesday, October 24, 2017 at 4:13:51 PM UTC-4, Maxim Bazhenov wrote:
>
> Hi,
>
> the documentation for clojure.zip/path states that it *"Returns a seq of
> nodes leading to this loc". *But the following test will fail (seq?
> returns false):
> (require '[clojure.zip :as z])
>
> (def v [[1]])
>
> (def vz (z/vector-zip v))
>
> (seq? (z/path (z/down (z/down vz
>
> The path actually returns a vector which is not a seq
>
--
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/d/optout.