Haskell Programming from first Principles: Why do lambdas matter?

There's lots of reasons. The lambda calculus was invented by Alonzo Church to act as an abstract model of computation. With lambda expressions, and nothing else, you can implement all the standard constructs of programming, such as numbers, booleans, lists, etc. See church encoding for the details. It's scheme of variables and substitution are at the root of any system where variables are bound then substituted into, such as a data declaration. As a result, it forms a large part of the basis for programming language theory.

As far as practical programming is concerned, a lambda expression is the same thing as anonymous functions. They are useful when you want to make a small-single use function, but don't want to bog down your program with needless surface definitions. Also note that let and where bindings are alternative notations that denote the same thing as a lambda expression.

(\f -> f a) g

is the same thing as

let f = g in f a

I don't think the average programmer would care about them beyond that.

They also have a deep connection to other areas of abstract mathematics, such as category theory. This has inspired interesting programming work, such as the concat library. It's also the basis of type theory, which can act as a foundation for mathematics that is an alternative to set theory. Lots of interesting and useful things have come out of the connection between the lambda calculus and abstract mathematics. That's the primary reason why so many people care.

/r/haskell Thread