$0+

Functional Programming, Simplified (PDF)

48 ratings
I want this!

Functional Programming, Simplified (PDF)

$0+
48 ratings

August, 2024

I’m pleased to report three things:

  1. This book is one of the highest-selling and highest-rated functional programming books of all time, both here and on Amazon.
  2. Book Authority recently rated it as the #2 Scala book of all time. (The #1 book is the unofficial Scala reference, co-written by Scala creator Martin Odersky).
  3. This PDF version is now free!

Free, as in zero dollars!

The website here may prompt you that you can “pay anything you want”, but my intent is for the book to be 100% FREE. So please don’t pay anything: $0 is just fine by me.

If you ever do want to pay anything for it, I would be happier if you:

And now, if you want to learn more about the book, read on, otherwise, go ahead and download your free copy now!

Why this book might be for you

When I first tried to learn FP I felt hopelessly lost. I tried to learn it through books like the well known “red book,” and as I tried to read that book, it was like the authors were speaking a totally different language — one that I couldn’t understand. They wanted me to do exercises at the end of every chapter, but I couldn’t, because I had no idea what they were talking about.

Frankly, books like that made me feel dumb, like there was no way I was ever going to learn FP.

However, as I would learn in a journey that took me about a year and a half, it’s not that the red book isn’t a good book; it’s just that it’s not meant for beginners. It assumes that you already know a fair amount about FP before you even read it. (Put another way, it’s for intermediate or advanced FP’ers.)

So I wrote this book for beginners, for people like me.

I start with the basics, and each short chapter builds on the one before it. And as you’ll see, one concept naturally flows into the next. After that — just like Sherlock Holmes investigating a problem — you’ll see that each lesson logically follows the previous lesson, and by the time you get to monads, you’ll think, “Of course, this is completely logical. If I was working in the FP field many years ago, I could have discovered monads myself.”

So, what you’ll find in this PDF is that it contains 137 small lessons that you can read in about five minutes each. Depending on your background knowledge, you may also be able to skip many of the lessons.

Please note that this book is written using Scala 2, but the lessons and concepts may apply to many other programming languages.

Reader comments

As of July, 2021, thousands of copies of this book have been sold, and it’s 5-star rated here with 33 ratings, and 4.6-star rated on Amazon, with 126 ratings.

Here’s some of the feedback from readers:

  • Your book is fantastic, I can’t find enough words to thank you!
  • Best Scala book I’ve read.
  • This is a GREAT book!
  • I finally understand monads. Thank you!
  • I love the writing style and the approach, great job!
  • I read this everyday after work and it makes me so happy. Thank you for this amazing book.
  • I love the small lessons, they make it easy to read.
  • The best $$$ spent on a tech book, ever.
  • Thanks Alvin for opening the door for this new world.
  • Your book was a real game changer to learn FP.
  • Very nice explanation. Just awesome.
  • Functional Programming Simplified is amazing, thank you for writing this.
  • Too bad I can’t grade higher than 5 stars
  • Exactly as promised, this book saves you a lot of time
  • The best introduction to FP that I have read for people who are coming from an imperative background
  • A very concise style that is easy to comprehend

Contents

In the book you’ll learn:

  • Five important rules for writing FP code in Scala
  • Why pure function signatures are much more important than OOP method signatures
  • How pure functions work with I/O
  • Lessons to simplify recursion
  • Partially-applied functions and currying
  • Type signatures are covered many times, so your brain can get used to patterns like `StateT[IO,GameState,Int]`
  • The proper way to handle exceptions and null values
  • Many lessons on for-expressions, which lead naturally into monads
  • State and IO monads, and monad transformers like StateT
  • Domain modeling with Scala/FP
  • An introduction to type classes, including an example with the Cats library
  • Handling concurrency with Akka actors and Scala futures
  • Visual lessons on collections’ methods like `fold` and `reduce`
  • Much more ...


The book is organized into small, single-purpose lessons that flow in a logical order. You’ll see how one concept naturally leads to the next concept, and that concept leads to another one, and so on.

This is the PDF website

On this website (Gumroad.com) you can buy the PDF version of the book. If you’re interested in other versions of the book:

Please note that there are no refunds on digital products like this, so if you want to be sure about what you’re buying, there’s a link to a large, free preview at the bottom of this page.

Free preview!

There are no refunds on digital products like this, but you can obtain a large, free preview of the book at this URL:

https://alvinalexander.com/scala/functional-programming-simplified-book

$
I want this!
Copy product URL

Ratings

4.9
(48 ratings)
5 stars
96%
4 stars
0%
3 stars
2%
2 stars
2%
1 star
0%