Fun with Lambdas
This book is 30% complete
Last updated on 2016-06-08
About the Book
"If you wish to make an apple pie from scratch, you must first create the universe."
- Carl Sagan, Cosmos
This book is about nothing. Or, rather, it is about starting with nothing and creating the world. In our day-to-day lives as programmers, we're used to languages that give us a wide range of nouns, concrete things, to work with, Numbers, String, Arrays, and so forth. And we happily combine them, trying to fit them together in such a way that we come out the other end with a large structure that solves our problem.
What we often forget, though, is that, taken by themselves, these structures are useless. When we talk about combining them, we really mean that we set up interactions between them, hoping that we've defined them correctly. Programming, itself, is about looking at and defining the spaces BETWEEN the nouns. And, yet, we don't spend a lot of time focusing there; when we discuss our programs, we often only mention the things. Take a look at a UML diagram: notice what gets the big boxes and what gets small little arrows connecting them.
In this book, we're going to throw away the nouns and only use the verbs. We're going to start with the most basic of things, the verb, something with an input and an output, and build up our world, our concrete structures. This verb, what we'll be using, is called the Lambda.
I'm planning for this book to be around 100 pages, perhaps stretching as high as 150. It is a short, focused, VERY code-heavy walk-through of building up a numbering system, then a character system, ending with strings. Along the way, we'll discuss the Peano axioms, Addition, Subtraction, Lists, Strings, Key/Value Pairs and end with a Dictionary implementation.
WHO IS THIS BOOK FOR
This is the first (hopefully) book in a series I'm thinking of as "Computer Science for the rest of us." This series is for people who have programming experience, but maybe have some holes in their theoretical knowledge, such as the lambda calculus. These are people who are interested in, and perhaps even started books such as "Function Programming through Lambda Calculus," but found it to be opaque and difficult to get into. They've heard of how cool it is, heard mention of church numerals and Cons/Car/Cdr, but nothing has reached out in a nice narrative way for them.
For this reason, I'm going to be staying away mostly from the more "academic" terms (although I might still have an appendix or two that introduces the ideas, especially how First/Second are really the K combinator and K(Identity)) and just walking through with concrete examples. As with my other book, I'll be pointing to other resources to "find out more" rather than padding the book with explanations.
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...