On Tue, Feb 14, 2012 at 5:00 PM, Stuart Sierra <the.stuart.sie...@gmail.com> wrote: > A sequence is equal to a list because Clojure defines = to compare similar > collections by their contents. For example, the vector [1 2 3] is equal (by > the = function) to the list (1 2 3). > > `eval` calls the Clojure compiler. The compiler operates on lists returned > by the reader, so I would not expect it to work on lazy sequences.
Macro expansions can use lazy sequences and work; e.g. (defmacro ... ... ~(map ...) ...) I think what's legal in a macro output should be legal in eval input. More to the point, if it looks and quacks like a (list of thingies) it should behave as one if evaluated, precisely because transforming forms using the native sequence functions is a powerful metaprogramming technique and having to wrap every such thing in (apply list ...) or (list* ...) is going to be a pain that might as well be avoidable and easily is avoidable. -- 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 Note that posts from new members are moderated - please be patient with your first post. 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