On Saturday, March 19, 2016 at 5:35:02 PM UTC-7, red...@gmail.com wrote:
>
> They are a logical consequence of the machine. 
>
> ->> is a mechanical transformation taking a form (->> x (a ... w)) 
> turning it into (a ... w x), and this same mechanical transformation is 
> in place when nested. You example expands in steps like: 
> [..]
>
> you can see each step in the expansion results come from applying the 
> exact same transformation (this transformation is exactly the ->> 
> macro). this is the natural result of a recursive style of definition. 
> While it is technically possible to change the behavior to what you are 
> suggesting, but it would require special casing ->> and any derivative 
> of ->>. 
>

Isn't it a function of how the recursive step is written?
 

> So we could have something that always works the same uniform way, or we 
> could have am ever growing list of special cases. 
>

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

I was hoping to achieve something similar via:

(->> a b c (->> d e f union))

We could have one uniform way without special casing if no one is relying 
on the current nesting semantics.

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

Reply via email to