On Feb 27, 2009, at 8:27 PM, Mark Engelberg wrote:
Maybe it doesn't matter in practice, but does it seem odd to anyone else that (rest ()) returns () rather than nil?
I think that's to be expected given the recent changes to how laziness works in Clojure. It's consistent with these docs:
Clojure user=> (doc rest) ------------------------- clojure.core/rest ([coll])Returns a possibly empty seq of the items after the first. Calls seq on its
argument. nil user=> (doc next) ------------------------- clojure.core/next ([coll]) Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil. nilWere you thinking of what's now called "next" and used to be called "rest"?
Why did you expect nil from rest in this case? --Steve
smime.p7s
Description: S/MIME cryptographic signature