Hi, On Tue, Nov 16, 2010 at 5:21 PM, Chris Maier <christopher.ma...@gmail.com>wrote:
> That makes sense... thanks, Meikel. > > Maybe my example of + wasn't the best, given its mathematical nature. > > Here's my situation: I'm writing some software to analyze some protein > datasets, part of which entails generating a Venn diagram of their > intersections. Each dataset has a unique name, and my function looks > up the data by this name in a database. Right now the function takes > a single "&" parameter of "datasets"; you give it as many dataset > names as you want, and it gives you the intersection breakdown. > Internally, this function just treats "datasets" like the sequence it > is. > > So I guess a better way to state my question would be this: if you > only have a function that operates on a sequence of items, and it > could be written either as > > (def foo [& stuff] ... ) > > or > > (def foo [stuff] ... ) ;; where 'stuff' is a sequence > > are there any concerns besides (for lack of a better term) the > "ergonomics" of calling such functions that should influence which > signature to use? > If you really want to treat your sequence lazily pass it explicitely and not as varargs. You can also provide both: clojure.core has #'conj and #'into for example. hth, Christophe -- 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