public interface ISeq extends IPersistentCollection {
Object first();
ISeq next();
ISeq more();
ISeq cons(Object o);
}
more
method of ISeq
interface seems to be functioning just rest
. Why is it named more
not rest
?
This information is my interpretation of doing some archeology on the Clojure git repository.
Originally there was only rest
, which returned nil
instead of the emtpy list as it does today. When Rich introduced lazyness, it was then renamed next
, and ISeq
gained the more
method. ASeq
implements the more
method to return an empty seq instead of nil
, and leaves the next
methond abstract. At some point after this the rest
function was brought back to life as the non-seq, empty list-returning version we know today, but the Java code wasn't refactored.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With