Re: Code layout

2013-12-11 Thread Cedric Greevey
On Wed, Dec 11, 2013 at 2:00 AM, Mark Engelberg wrote: > Put as much as is legible on one line. If you need to break lines, break > after the function name, not after the first parameter, in order to > minimize rightward drift. > I've always preferred (map foo coll1 coll2) over breaking af

Re: Code layout

2013-12-10 Thread Mark Engelberg
Put as much as is legible on one line. If you need to break lines, break after the function name, not after the first parameter, in order to minimize rightward drift. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send ema

Re: Code layout

2013-12-10 Thread Laurent PETIT
It really doesn't matter, both are right/wrong Le mercredi 11 décembre 2013, Plínio Balduino a écrit : > Hi there > > What is the ideal way to format Clojure code? I'm following Batsov's Style > Guide but, in some moments, it sounds a bit confuse to me. > > To the point: > > (reduce + >

Re: Code layout

2013-12-10 Thread Russell Mull
I sometimes find that, when the formatting gets hairy, I need to either refactor my code or use one of the pipeline macros. (->> nums (filter even?) (reduce +)) - Russell On Wednesday, December 11, 2013 11:24:16 AM UTC+9, Plinio Balduino wrote: > > Hi there > > What is the ideal way

Re: Code layout

2013-12-10 Thread John Gabriele
On Tuesday, December 10, 2013 9:24:16 PM UTC-5, Plinio Balduino wrote: > > Hi there > > What is the ideal way to format Clojure code? I'm following Batsov's Style > Guide but, in some moments, it sounds a bit confuse to me. > > To the point: > > (reduce + > (filter even? >

Re: Code layout

2013-12-10 Thread Dan Cross
Why not just, (reduce + (filter even? nuns)) ? That's a simple enough form I wouldn't bother with the line breaks. On Tue, Dec 10, 2013 at 9:24 PM, Plínio Balduino wrote: > Hi there > > What is the ideal way to format Clojure code? I'm following Batsov's Style > Guide but, in some moments, it

Code layout

2013-12-10 Thread Plínio Balduino
Hi there What is the ideal way to format Clojure code? I'm following Batsov's Style Guide but, in some moments, it sounds a bit confuse to me. To the point: (reduce + (filter even? nums)) or (reduce + (filter even? nums)) Which one is preferable, more corre