On Feb 16, 2:22 pm, Mibu <mibu.cloj...@gmail.com> wrote:
> rest is expected to be a sequence by Lispers, and next is expected to
> be an item by Java-ers.

I actually think next is pretty close to the next method on Java
iterators. In java.util.Iterator, the next method evaluates the next
item, increments state the iterator, then returns the evaluated item.
In Clojure, the next function evaluates the next time, then returns a
cons containing the evaluated item and the Clojure equivalent of an
incremented iterator. It's essentially the functional equivalent of
the Java method.

Regarding Lispers, Clojure already differs from common Lisp in that
nil != (). I think the proposed lazier changes make rest more
consistant; instead of returning a collection or nil, it just returns
a collection. Philosophically, I think this is closer to the idea of a
cons cell than it was previously.

Of course, this is all just my opinion :)

- James
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to