Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Java Lambdas

You're reading from  Learning Java Lambdas

Product type Book
Published in Mar 2017
Publisher
ISBN-13 9781787282087
Pages 114 pages
Edition 1st Edition
Languages
Author (1):
Toby Weston Toby Weston
Profile icon Toby Weston
Toc

λs in functional programming


Before we look at things in more depth, let's look at some general background to lambdas.

If you haven't seen it before, the Greek letter λ (lambda) is often used as shorthand when talking about lambdas.

1930s and the lambda calculus

In computer science, lambdas go back to the lambda-calculus. A mathematical notation for functions introduced by Alonzo Church in the 1930s. It was a way to explore mathematics using functions and was later re-discovered as a useful tool in computer science.

It formalized the notion of lambda terms and the rules to transform those terms. These rules or functions map directly into modern computer science ideas. All functions in the lambda-calculus are anonymous which again has been taken literally in computer science.

Here's an example of a lambda-calculus expression:

A lambda-calculus expression

 λx.x+1
This defines an anonymous function or lambda with a single argument x. The body follows the dot and adds one to that argument.

1950s...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime