Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Lambda  RSS feed

 
Carlos Solano
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your book have deep explanation about lambda expressions?
 
Campbell Ritchie
Marshal
Posts: 55670
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

[1] http://en.wikipedia.org/wiki/Lambda_calculus
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!