On Monday, March 21, 2016 at 5:33:36 PM UTC-7, James Reeves wrote: > > > >> The question I was asking is: does anyone rely on the current behavior? >> For people adapting this syntax for a query language, it's appealing to >> write: >> >> a->b()->c() >> ->union(d->e()->f()) >> >> and get (union (c (b a) (f (e d))) >> > > That's what: > > (-> a b c (union (-> d e f))) > > expands to. > > - James >
Thanks. That works great for union and intersection, although I prefer threadLast over threadFirst for other reasons. The thing that motivated this line of thought is that we have some primitives that read from right to left and unlike union/intersection are order sensitive. (apply q2 q1) means for each result of q1, run q2 and return the results. For q1 = a->b()->c() and q2 = d->e()->f(), I'm trying to find an acceptable/natural thread last syntax. user=> (clojure.walk/macroexpand-all '(->> a b c (->> d e f (apply)))) (c (b a) (apply (f (e d)))) Is there a way we could end up with (apply (f (e d)) (c (b a))) -Arun -- 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/d/optout.