On Mon, 09 Feb 2009 13:24:46 +0300, Kagamin <s...@here.lot> wrote:
Denis Koroskin Wrote:Could be used as follows: foo( (i) { ++i; } );Holy shi- Now feel some real power, Luke. :) foo( i => ++i );foo((i){ ++i; }); // error foo((i){ ++i; return;}); // unambiguous foo((i){ return ++i;}); // unambiguous
That was just an example. Those short lambdas are often used as predicates. Compare: findAll(array, (i) { i > 3; }); findAll(array, (int i) { return i > 3; });