> It's confusing that the REPL prints out a list structure when it's in fact a
> sequence:


There's really only one key difference between seqs and lists is that
lists include a count private field. So the only way that you will
ever have a problem in this regard is when doing a count on the data.
In the case of seqs the count will be O(n) until it hits a list when
suddenly it becomes O(1) and count on lists is always O(1).

So just be aware that doing a count on a seq could be slow (or may not
be) and there really isn't a problem. Personally I consider lists to
be "slightly faster" seqs. In reality seqs are just any object that
implements ISeq. So this also includes Cons, LazySeq, PersistentList,
KeySeq, ValueSeq, etc.

Timothy

-- 
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

Reply via email to