
On Thu, Oct 2, 2008 at 8:58 PM, Peter Dimov <pdimov@pdimov.com> wrote:
for_each(arg1, lambda(_a = arg2) [ push_back(arg1, _a) ] )
...
I'm not an expert on modern FP, but the above lambda doesn't seem like a classic lambda (as in lambda calculus and Lisp) to me.
Now that I've seen what Phoenix can do, I think that, were I to design a Boost.Lambda2, I'd probably go with a classic lambda of the form
lambda( _x, _y )[ _x + _y ]
where the inner _x + _y is not a function object, and it is the lambda[] that turns it into one. (That is, the evaluation of an inner expression would be done with eval(expr, args...) and not with expr(args...).)
Oh yes please! Unfortunately I think that this would require major surgery of phoenix... -- gpd