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 calculus

The Lambda calculus defines what a function is from a computational perspective. It's comprised of three things:

  • Variables (x, y, z, and so on)
  • A way of creating functions (with the "\" notation)
  • A way to apply functions (substitution)

Everything else is defined in terms of encoding those three things.

In Chapter 7, Functional Parameters, we defined a function where f is the function name, x is the input value, and the result is the whole expression f(x):

If f(x) = x + 2, then we know that every time we input the value three, five will always be the output value. So, functions are like black boxes where we put values in and ...

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