>> This is hardly unfortunate! The API is carefully designed: object args come >> >> first, seq args come last. >> >> Eh, not always: conj, nth, and several others put seq args first, >> though cons can be used on seqs in place of conj and has the seq arg >> last. >> >> You may be right, but so far your chosen examples support my point: >> * conj is *not* a sequence fn -- it builds the type of thing passed in, not >> a seq >> * nth is *not* a sequence fn -- it knows about random access collections and >> navigates them appropriately > > Oh, I'm sorry, I naturally interpreted "sequence fn" to mean "fn that > can perform a sequence operation on a sequence arg" rather than "fn > that is *exclusive* to sequences and won't work on anything else". > Apparently you meant the latter? Which still doesn't matter since > someone operating on sequences might very well want to call nth or > similar at some point.
In the context of chaining operators such as ->>, it is logical to consider both the input and output of the function. The functions listed under the "Seq In, Seq Out" section at http://clojure.org/sequences should all take their seq arg last. There is a ticket in JIRA for making -> and ->> more flexible, but I couldn't trivially find it because you can't search for punctuation. Feel free to respond with a link... Stuart Halloway Clojure/core http://clojure.com -- 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