A friend of mine informed me of this report
Lambda expressions and closures for C++
Jeremiah Willcock, Jaakko Jarvi, Doug Gregor, Bjarne Stroustrup,
Andrew Lumsdaine
2006-02-26
http://public.research.att.com/~bs/N1968-lambda-expressions.pdf
and I thought you might be interested. (I searched a little and
didn't find any discussion on this report in this list.)
A few highlights:
----------------------------------------------------------------------
We propose to extend the C++ language with lambda expressions, and
define the semantics of these unnamed local functions via translation
to closures: function objects implemented using local classes.
..
void f() {
int sum = 0;
for each(a.begin(), a.end(),
<>(int x) -> int extern(sum) {return sum += x;});
}
..
2.1 Omitting the return type
The return type of a lambda expression can be omitted if the body
of the lambda function contains at most one return statement.
----------------------------------------------------------------------
Enjoy:-),
Eijiro
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs