It might help to simplify. Whenever you're accumulating over a
sequence of things, think of reduce:

(let [__ (fn [& fs]
             ;;  Here's the function:
             (reduce #(fn [x] (%1 (%2 x))) fs))
     ]
     ;;  Testing:
     [ (= 5 ((__ (partial + 3) second) [1 2 3 4]))
       (= [3 2 1] ((__ rest reverse) [1 2 3 4]))
     ])

Each step in the accumulation creates a new function that just applies
the current function to an argument that is the result of applying the
already-composed ones.

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

Reply via email to