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 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?
>
> If you tell me "it really doesn't matter, both are right/wrong", I'll 
> accept as a completely valid answer.
>
> Thanks in advance
>
> Plínio
>

-- 
-- 
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.

Reply via email to