On Tue, Jun 14, 2011 at 8:12 PM, Sean Corfield <seancorfi...@gmail.com> wrote: > On Tue, Jun 14, 2011 at 1:28 PM, Nick Zbinden <nick...@gmail.com> wrote: >> Stu said: >> Objects should be the first parameter to a function (like it would be >> in traditional OO). >> Collections sould be in the last place in th parameter list. >> >> This is because it makes the use of the threading operater easy -> for >> Objects ->> for Collections really easy and can make code much better >> to read. > > Timely. This came up in another thread recently and it was pointed out > that several core functions have the collection argument first: nth, > assoc, contains?, get-in, assoc-in, update-in ... > > Given the stated preference for collections appearing as the last > argument, is there some particular reason why these functions are > exceptions? Or is it just a legacy accident before the "standard" of > collection-last was established?
Most of those are map rather than sequence ops. The one that stands out as awkward is nth. (nth 3 [1 2 3 4 5]) should probably be the way it goes. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- 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