On 2/9/12, Jacob Carlborg <[email protected]> wrote:
> Yes it is. Together with delegates.

I didn't find them next to delegates but after hash literals in the
Expressions section.
http://www.d-programming-language.org/expression.html#Lambda

It should have usage examples though. It took me a while to figure out
what was wrong with this:

void test(int function(int, int) func) {
    func(1, 2);
}

void main() {
    test(x, y => x);
}

Error: undefined identifier x

The fix: test((x, y) => x);
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to