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? > nums)) > > or > > (reduce > + > (filter > even? > nums)) > > Which one is preferable, more correct, expressive or idiomatic? > > In general, I think it's best to vertically align arguments (your first example), however, for very simple cases (like this one, where the reduce func, the filter func, and the coll are all just symbols), putting it all on one line (as Dan suggests) is fine. Any more complicated though I'd start vertically-aligning args. :)
-- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.