On 28 Oct 2010, at 16:42, Amitava Shee wrote:

I would like to apply an higher order function on an arbitrarily
nested data structure which yields exactly the same structure but the
original values replaced by the result of applying the passed in
function.

This is somewhat akin to the fmap function in Functor type class in
haskell. I had a brief discussion with Christophe Grande at the Conj
and he mentioned I post it to the group.

Look at clojure.contrib.generic.functor/fmap. That's a multimethod with implementations for the standard Clojure data structures. You can easily add your own for additional data structures.

Konrad.

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