Mavnn's blog

Stuff from my brain

Get With It, C# Compiler!

Who doesn’t want to build recursive lambda functions?

Func upChain = move =>
                {
                    if (move.ChainParentId != null)
                        upChain(Coa.MoveRequests.Single(
                            m => m.Id == move.ChainParentId));
                    return move;
                };

should work (according to me), but it complains that the second upChain is an unassigned local variable.

And I don’t feel like rolling my own y-combinator.

Comments