Lambda

Carlos Solano

Greenhorn

Posts: 24

posted 3 years ago

Your book have deep explanation about lambda expressions?

Campbell Ritchie

Marshal

Posts: 55670

161

posted 3 years ago

What do you mean by “deep”. It doesn't (at least not in the parts I Have read) describe their history or Church's theory. Lambdas are actually something which is obscure in maths, but much better known in computer sciences.

Raoul Gabriel

Author
Greenhorn

Posts: 20

6

posted 3 years ago

1

Hi Carlos,

We cover lambda expressions in details. Our book has one chapter introducing the motivation for lambda expressions (chap 2) and another one that shows how they can be used in your code (chap 3). We also cover some subtleties such as certain restrictions (e.g. lambdas can't mutate local variables) and how to combine lambda expressions (e.g. combining two predicates or composing two functions). In addition, we have another chapter (chap 7) that shows how several verbose object-oriented design patterns can be refactored to be more concise using use lambda expressions.

Of course we don't discuss the lambda calculus [1] (where the term lambda comes from) as this is not helpful to get you to adopt lambda expression in your code.