AIExplainer
Machine Learning Intermediate 1 min read

What is lambda?

A small, anonymous function in programming

In programming, a lambda is a small function that can be defined inline within a larger expression. It is often used to perform a simple operation or to create a short, one-time-use function.

A lambda is like a disposable tool that you use once and then throw away, whereas a regular function is like a reusable tool that you keep in your toolbox.

For example, in a web application, a lambda might be used to sort a list of items in response to a user's click on a button.

Lambdas are often used in data processing, event handling, and as arguments to higher-order functions.

Some people think that lambdas are only used in functional programming, but they can be used in any type of programming.

The term 'lambda' comes from the Greek letter lambda, which was used by mathematician Alonzo Church to represent anonymous functions in his lambda calculus.

anonymous function closure inline function

Three products for different needs — explore what’s relevant to you.