On Wed, Oct 20, 2010 at 09:52, Alan <a...@malloys.org> wrote: > I agree with Tom (and with Stuart). I tend to like using ->> when it's > convenient, since all you're really doing is performing a list of > transformations on a single object. However, the let is better > documentation if that's ever going to matter. Not because it makes it > easier to understand what operations are being performed - ->> is just > as good at that - but because you assign names to the intermediate > results. Then someone reading your code can see what the purpose of > each transformation is, without having to look at the definition of > other functions. > > I also find that the let form permits you to drop print statements in to see what the outcome of various functions are;
(defn [x] (let [_ (prn x) x (transform-somehow x) _ (prn x)] x)) -- 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