As the page you linked described, next
is stricter than (the new behaviour of) rest
because it needs to evaluate the structure of the lazy cons to know whether to return nil
or a seq.
rest
on the other hand always returns a seq, so nothing needs to be evaluated until you actually use the result of rest
. In other words, rest
is more lazy than next
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…