On Nov 15, 8:52 am, Chris <christopher.ma...@gmail.com> wrote: > If you have a function that needs to treat multiple arguments as a > group, what forces drive you to represent this as a single sequence > argument vs. an "&" argument? To give a concrete example, why does > "+" work like > > (+ 1 2 3 4) > > instead of > > (+ [1 2 3 4]) > > Is it performance? Aesthetics? Composability concerns? Not having > to call "apply" all the time? > > Thanks, > Chris
The "&" form is a syntax helper. In other words it is intended to change the source code, not to change the way you program. Thus you have to look at the intended use of the function. If you are going to type different number arguments to a function right in the code yourself, then use &. If you are going to get the arguments for that function at runtime, then use a single argument. Examples: map, filter, reduce. -- 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