On May 2, 11:14 pm, Mike Meyer <mwm-keyword-googlegroups. 620...@mired.org> wrote: > On Sun, 02 May 2010 13:06:56 +1000
> To get behavior similar to the vector constructs, you want to use > list, which works like vector, except returning a list instead of a > vector: (list 1 2 3 (print :hello)). It seems that what's missing here > is a syntax for (list. I'm not sure it's needed, as it never appeared > in LISP, but #[ seems to be the logical candidate: > > { - hash-map #{ - hash-set [ - vector #[ - list > Hmmh. I haven't read the discussion very carefully but it seems there might be a fundamental misunderstanding here somewhere. The thing is that (foo bar) *is* a list of two symbols, even if not quoted. It just so happens that when such a list is passed to the evaluator, it evaluates it as a function call. Similarly, [foo bar] is *not* a shortcut for (vector foo bar); it *is* a vector of two symbols, and vectors just have different evaluation semantics. The same applies to sets and maps. The best you'd get out of a #[foo bar] is a simple reader macro that expands to (list foo bar) and that's really just a waste of macro characters, not to mention confusing. Or you would have to have a list type that isn't evaluated as a function call. But that path leads to insanity. -- 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