On 7/27/2012 12:19 AM, Joel Falcou wrote: > Le 27/07/2012 08:11, Eric Niebler a écrit : >> Naming is becoming an issue, though. We already have proto::transform. >> You'd be adding proto::functional::transform that would be totally >> unrelated. I think I screwed up with the namespaces. It should probably >> be proto::functional::fusion::transform. Urg. > > Well, I guess this is a breaking change :s
I could import the existing stuff into proto::functional for back-compat. > What I need is maybe more generic as I need to apply an arbitrary > function with arbitrary number of parmaeters, the first beign the > flattened tree, the others begin whatever: > > transform( f, [a b c d], stuff, thingy ) > => [f(a,stuff,thingy) f(b,stuff,thingy) f(c,stuff,thingy)] Seems to me you want to be able to bind the 2nd and 3rd arguments to f so that you can do this with a standard transform. transform( [a b c], bind(f, _1, stuff, thingy) ) => [f(a,stuff,thingy) f(b,stuff,thingy) f(c,stuff,thingy)] > I'll try and ake it works out of the box first and see how it can be > generalized. I'll take transform and bind if you write them. :-) -- Eric Niebler BoostPro Computing http://www.boostpro.com _______________________________________________ proto mailing list proto@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/proto