Skip to Content
Learning Functional Programming in Go
book

Learning Functional Programming in Go

by Lex Sheehan
November 2017
Intermediate to advanced
670 pages
17h 35m
English
Packt Publishing
Content preview from Learning Functional Programming in Go

Lambda expression ingredients

A lambda expression is an unnamed block of code with parameters.

A lambda expression consists of three things:

  • A block of code x + 2
  • Parameters x
  • Values for the free variables (not defined inside the code block) 5

Lambda calculus uses the following three concepts to describe how to perform a unit of computation:

  • Abstraction (defining a function)
  • Binding (defining a variable)  
  • Application (executing a function)

Variables that are unbound are referred to as free variables. Computation is achieved by performing single steps of reduction:

  1. Alpha reduction  
  2. Beta reduction
  3. Eta reduction

Consider the following untyped Lambda calculus statement:

(λx.xx)(λx.xx)

The lambda symbol (from whence the name is derived) ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Functional Programming

Learning Functional Programming

Jack Widman

Publisher Resources

ISBN: 9781787281394Supplemental Content