Is there a difference between expression lambda and statement lambda?
If so, what is the difference?
Found this question in the below link but could not understa
This is indeed confusing jargon; we couldn't come up with anything better.
A lambda expression is the catch-all term for any of these:
x => M(x)
(x, y) => M(x, y)
(int x, int y) => M(x, y)
x => { return M(x); }
(x, y) => { return M(x, y); }
(int x, int y) => { return M(x, y); }
The first three are expression lambdas because the right hand side of the lambda operator is an expression. The last three are statement lambdas because the right hand side of the lambda operator is a block.
This also illustrates that there are three possible syntaxes for the left side: either a single parameter name, or a parenthesized list of untyped parameters, or a parenthesized list of typed parameters.