Clojure: rest vs. next
问题 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 preference should probably be to use rest , but it doesn't really explain clearly the difference between the two. Can anybody provide some insight? 回答1: 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