Something went wrong. Try again.
Something went wrong. Try again.
Lambdas #
Lambdas are @[functions][] that are typically:
- defined within another function; and
- capture (for later reference) values from the context in which they were defined.
They are also often called anonymous functions because they often use a different syntax than regular functions, which does not include a name.
Lambdas are featured in most languages these days, but are of particular note in some common ones that I care about such as:
- Javascript (both regular functions and @[arrow functions][js-arrow-functions] can be used like lambdas)
- @[Rust][rs-lambda]
- @[Haskell][hs-lambda]
- @[C++][cpp-lambda]
The name "lambda" comes from the @[Lambda Calculus][].