On Sun, Nov 30, 2008 at 2:29 PM, Mark Volkmann <[EMAIL PROTECTED]> wrote: > > Many of the provided functions take arguments named "coll" or "seq". > Is the choice meant to indicate something significant about what can > be passed? As far as I know, every collection can be treated as a > sequence. Maybe the opposite isn't true.
The name 'seq' should never be used, in my opinion, except when referring to the clojure.core/seq function that returns a seq for a collection. 'coll' is usually sufficiently accurate, in that functions generally should take a collection and get a seq from it if needed. This often happens transparently as many standard functions take a collection and call seq on it internally (first, rest, last, etc.) If you actually have a function that relies on being given a seq and not a collection, I suppose 'coll' would be a misleading name. In that case perhaps 's' or 'sequence' or something would do, but never 'seq'. Although it doesn't directly generate an error to use the word 'seq' as an arg or local, it shadows the builtin 'seq' function and is likely to cause confusing errors if you ever try to call the standard function. --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---