In Clojure is an empty list a sequence of infinite nulls? -
I'm learning the concept of sequence and zero in the closor The result of a small experiment was
1: 6 users => (First '()) Zero 1: 7 users => (Rest '()) () 1: 8 users => (First (the rest '())) Zero Does this mean that' () is actually the sequence of NIL?
If you want to check that the "rest" of an archive is empty, next Use .
User & gt; (Next '(Foo Bar)) (Bar) User & gt; (Next '()) zero user & gt; (Doctor next) ------------------------- clojure.core / next ([coll]) gives a seq of items after the first. Call seq on your logic if there are no other things, return zero. "blank collection / seq and zero to treat as the only thing) last year was removed in favor of lazy scenes. See for a discussion of this change.
Comments
Post a Comment