I\'m having a hard time understanding the difference between rest and next in Clojure. The official site\'s page on laziness indicates that the pre
next is like (seq (rest ...)).
rest will return the remaining piece of a sequence. If that piece of the sequence has not yet been realized, rest doesn't force it. It won't even tell you if there are more elements left in the sequence.
next does the same thing but then forces at least one element of the sequence to be realized. So if next returns nil, you know there aren't any more elements left in the sequence.