On 27 December 2012 18:52, Ben Wolfson <[email protected]> wrote:
> On Thu, Dec 27, 2012 at 9:08 AM, Michał Marczyk
> <[email protected]> wrote:
>> On 27 December 2012 03:28, Tom Jack <[email protected]> wrote:
>>> It looks like the only thing missing to make Cons implement IPersistentList
>>> is IPersistentStack. Why not implement it?
>>
>> IPersistentStack extends IPersistentCollection, which includes
>> count(), so that's no go for Cons (the rest part might be a lazy seq).
>
> Doesn't stop existing lazy seqs:

Oh, indeed. Thanks!


>
>
> user=> (def x (repeat 2))
> #'user/x
> user=> (coll? x)
> true
> user=> (instance? clojure.lang.IPersistentCollection x)
> true
> user=> (count x)
> ; predictable lack of results
>
> --
> Ben Wolfson
> "Human kind has used its intelligence to vary the flavour of drinks,
> which may be sweet, aromatic, fermented or spirit-based. ... Family
> and social life also offer numerous other occasions to consume drinks
> for pleasure." [Larousse, "Drink" entry]
>
> --
> 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

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

Reply via email to