Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Meikel Brandmeyer
Hi, Am 28.06.2009 um 07:45 schrieb Handkea fumosa: It's list? that isn't. No. list? is not broken. Every list is a seq, but not every seq is a list. Consider: (cons 0 (iterate inc 1)) This is no list! It's a sequence. Why should list? return true? In Clojure there is no such thing as a

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Rich Hickey
On Sun, Jun 28, 2009 at 2:26 AM, Meikel Brandmeyerm...@kotka.de wrote: Hi, Am 28.06.2009 um 07:45 schrieb Handkea fumosa: It's list? that isn't. No. list? is not broken. Every list is a seq, but not every seq is a list. Consider: (cons 0 (iterate inc 1)) This is no list! It's a

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Handkea fumosa
On Jun 28, 1:49 am, Richard Newman holyg...@gmail.com wrote: cons is acting according to its documentation. It's list? that isn't. That's not strictly true Are you calling me a liar? Is there a reason why you are testing for listiness rather than for   some other property, like

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Handkea fumosa
On Jun 28, 11:21 am, Rich Hickey richhic...@gmail.com wrote: This too is a bit much. The OP wasn't trying to use cons as a pair, just expecting list? to be more similar to listp. It's a reasonable mistake, please be gentle. If you're referring to me, I don't agree that it is a mistake to

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Rich Hickey
On Jun 28, 11:52 am, Handkea fumosa hfum...@gmail.com wrote: On Jun 28, 1:49 am, Richard Newman holyg...@gmail.com wrote: cons is acting according to its documentation. It's list? that isn't. That's not strictly true Are you calling me a liar? Is there a reason why you are

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Richard Newman
It's list? that isn't. That's not strictly true Are you calling me a liar? Not a liar; just misinformed, as I hope I demonstrated by citing the docs. I don't see any value in continuing this thread of the discussion, but I wanted to clear that up. If you don't think list? should be

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-28 Thread Handkea fumosa
On Jun 28, 12:14 pm, Richard Newman holyg...@gmail.com wrote: It's list? that isn't. That's not strictly true Are you calling me a liar? Not a liar; just misinformed I don't agree. --~--~-~--~~~---~--~~ You received this message because you are

Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Handkea fumosa
user= (list? '(1 2 3)) true user= (list? (cons 4 '(1 2 3))) false --~--~-~--~~~---~--~~ 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

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Stephen C. Gilardi
On Jun 28, 2009, at 12:07 AM, Handkea fumosa wrote: user= (list? '(1 2 3)) true user= (list? (cons 4 '(1 2 3))) false user= (doc cons) - clojure.core/cons ([x seq]) Returns a new seq where x is the first element and seq is the rest. nil user=

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Handkea fumosa
On Jun 28, 12:41 am, Stephen C. Gilardi squee...@mac.com wrote: On Jun 28, 2009, at 12:07 AM, Handkea fumosa wrote: user= (list? '(1 2 3)) true user= (list? (cons 4 '(1 2 3))) false    user= (doc cons)    -    clojure.core/cons    ([x seq])      Returns a

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Richard Newman
cons is acting according to its documentation. It's list? that isn't. That's not strictly true: user= (doc list?) - clojure.core/list? ([x]) Returns true if x implements IPersistentList nil user= (cons 5 '(1 2 3)) (5 1 2 3) user= (ancestors (type *1))