> > Yes, but I think maybe there is a bug in Clojure that causes the first > case to "work" when it should give a syntax error. If it is not a bug > I do not understand why it ignores the expression. >
It's not a "bug" in Clojure because Clojure doesn't really have syntax in the way that you seem to be referring to, and I assume that you mean this in the sense that Python has list comprehensions as a syntactical feature of the language. A list comprehension in Clojure is just a macro not any part of the "core" language so to speak. Much of Clojure is like this. The macro could do some sort of syntactical checking. But in this case it doesn't really seem like it's worth it. You could of course re-implement your own version of list comprehension that does incorporate this. Unlike Python where this is probably not realistic (you can't easily implement new Python syntax for yourself), Clojure being a Lisp makes this quite easy. David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---
