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
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
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
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
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
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
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
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
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=
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
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))
11 matches
Mail list logo