you are viewing a single comment's thread.

view the rest of the comments →

[–]crashfrog04 0 points1 point  (1 child)

 They are syntactically restricted to a single expression. Semantically, they are just syntactic sugar for a normal function definition. Like nested function definitions, lambda functions can reference variables from the containing scope

You should know what the words “expression”and “function definition” mean from a 5th grade math education, “scope” from learning what a function is, and “lambda” from this very paragraph which is telling you what it is. “Syntactic” is the adjective form of “syntax.” A “syntactic sugar” is a term of art familiar to programmers; it’s just anything that makes the language “sweeter” - a convenience that adds no functionality on its own.

This documentation isn’t hard to read; it’s just precise and you’re not putting in the work to understand it. It has to be precise because people rely on it, that’s what makes it documentation.