"Plus a macro makes for shorter syntax, which is part of its purpose."
Yeah the shorter syntax becomes even more apparent when you're piping/ threading through one-arg functions where it also saves on parenthesis, as the "->" and "pipe" macros expand to a list if necessary. E.g. this code in a comment section in src/clj/clojure/zip.clj shows someone clearly seeing the benefit of "->" for testing: " (def dz (vector-zip data)) [...] (-> dz next next (edit str) next next next (replace '/) root) [...] (-> dz next next next next next next next next next remove (insert- right 'e) root) " You could get similar benefits from pipe: (pipe (whole-numbers) filter-even filter-prime filter-unlucky) For the "let->" form, would it help to have the placeholder be part of the macro's name? E.g. "(->it (whole-numbers) (filter even? it))" or "(->% (whole- numbers) (filter even? %))". Looks more obvious, not sure of the implications though. I think both the "pipe" and "let->" forms would be really useful additions to "->". Names that make sense together would be plus. "pipe->" and "let->" ? --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---