On Sunday, March 1, 2015 at 4:16:06 PM UTC-5, Bill Allen wrote:
>
> Hopefully that makes sense. Let me illustrate.
>
> (reduce + [1 2 3 4])
> ;=> 10
> (reductions + [1 2 3 4)
> ;=> (1 3 6 10)
>
> (-> 1 f g h)
> ;=> (h (g (f 1)))
>
> I'm hoping to get a function that behaves like:
> (--> 1 f g h)
> ;=> ((f 1) (g (f 1) (h (g (f 1))))
>
> Any ideas?
>

(reductions #(apply %2 %1) 1 [f g h]) or something to that effect (don't 
have repl handy at the moment to test it) 

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