Email the Author
You can use this page to email Charles Scalfani about Functional Programming Made Easier.
About the Book
Functional Programming is hard. Too hard. I struggled for years to learn a Functional Language with no definitive guide that takes you from knowing absolutely NOTHING to working as a Functional Programmer.
Functional Programming is clearly the future, which can be witnessed by looking at all the traditional languages slowly adopting Functional Features. But why compromise? Why not have all the power of a truly Functional Programming Language?
For most, moving from an Imperative Programming Language (Javascript, Python, C#, Java, etc.) to a Functional Programming Language (Haskell, PureScript, etc.) has been very difficult and requires years of effort.
Well, no more. Functional Programming Made Easier will start you at the very beginning with the basics. The book assumes that you know nothing about Functional Programming. It takes you one baby step at a time from concept to concept until you’re working at the level of today’s working Functional Programmers.
The book alternates between a Lecture Chapter, where a new concept is introduced and we code together, followed by a Lab Chapter, where you do all the coding using that new concept. But fear not. Unlike Math books you encountered in school, I will show you ALL of the answers. Not only that, but I will write the code ONE LINE AT A TIME with an explanation of my thinking every step of the way.
When mistakes were made in coding or design, I left them in the book. Anyone who has programmed knows all too well that you never code anything correctly the first time. Your experience with this book will simulate that as much as possible. We’ll find the mistakes, analyze where I went wrong (sometimes purposely), and fix them together.
I never just throw code your way. I will ask you to write some code and if you are struggling, I will sometimes give you hints so you can give it another try. In the end, we will always code the solution one line at a time allowing you to follow along if you get stuck or to simply check your solution against mine if you complete the exercise.
The first half of the book is where you’ll learn new concepts. The second half is where you can apply what you’ve learned to build small programs. The final few chapters are where you’ll build a Full-Stack web server and browser-based front end written in a Purely Functional Programming Language, PureScript.
PureScript is a modern Haskell-like Purely Functional Programming Language that compiles to Javascript making it the best Functional Programming Language for both the Browser and the Server (via Node). It’s so closely related to Haskell that all of the concepts you learn translate directly from PureScript to Haskell.
I’ve used this book over the past year to teach a team of developers who are all now building SaaS applications for customers in PureScript.
The book assumes you have no Mathematical experience and only a modicum of Programming experience.
Some of the subjects that are explained in detail are as follows:
- Pure Functions
- Immutability
- Higher-order Functions
- Currying
- Partial Application
- Recursion
- Tail Recursion
- Pattern Matching
- Types
Polymorphic
Monomorphic
Sum
Product
Typeclasses
- Multi-parametric Typeclasses
- Overlapping Instances
- Orphaned Instances
- Functional Dependencies
- Isomorphisms
- Homomorphisms
- Abstract Algebra
Magma
Semigroup
Monoid
Group
Abelian Group (aka Commutative Group)
Semiring
Ring and Commutative Ring
Euclidean Ring
- Folds
- Algebraic Data Types (ADT)
- Functors (Covariant, Contravariant, Invariant)
- Functors of Values vs Functions
- Bifunctors
- Profunctors
- Applicative Functors
- Traversables
- Foldables
- Applicative Parsers
- Monads
- Monadic Parsers
- Monad Stacks (aka Monad Transformers)
- Category Theory (superficially)
Definition
Hask Category
Functors
Applicative
Kleisli Category
Some of the skills it’ll teach you along the way are:
- Interpreting Compiler Errors
- Type Holes
- Effects (Synchronous and Asynchronous)
- AVars and Refs (Managed Global State)
- Data Bus
- Ajax
- JSON Decoding
- Foreign Function Interface (FFI)
From the exercises and final project you will learn:
- Hash Routing
- Static File Servers
- CORS
- Salt Hashing Passwords
Honestly, I did not want to write this book. I would’ve rather that someone else had written so I could have just read this one book when I was learning Functional Programming. My journey would have been so much easier. While Functional Programming will never be easy, with this book, it will be much easier.
ATTENTION: For those who live in countries where even the lowest price of this book is too expensive, e.g. because of currency exchange rates, please use the Email the Author link and let me know what you can afford to pay and I'll send you a coupon that will reduce the cost to that amount.
About the Author
Charles Scalfani has been developing software for 40 years. He started back in the days when people programmed in Assembly Language on 8-bit microprocessors. He worked on the firmware for one of the first audio cards for a PC and subsequently used it to develop a service for Record Companies for a touchscreen-based point-of-sale kiosk that was installed in Tower Records stores all over the country called the Music Sampler.
During the following decade, Charles developed one of the first digital ink-and-paint systems, Annie, at an Oscar-winning Hollywood studio. His software was used to produce animated commercials and cartoons, most notably, Ren and Stimpy for Nickelodeon and Beavis and Butthead for MTV.
Thereafter, he and 5 coworkers formed a production studio, Class6 Entertainment, where he worked on a new Animation Production system and Game Runtime Engine that was used to produce the CD-ROM game, Creature Crunch, starring Martin Short and Eugene Levy.
Since then, he’s been working mostly in traditional businesses from process control, automation, point-of-sales, dot-com, consulting, and manufacture monitoring, where he created a Patented process for tracking contaminated milk in dairy plants.
He’s currently the CTO for Panoramic Software where he and a team of developers recently created a system that helps Veteran Service Organizations more efficiently help Veterans file benefit claims, a potentially life-saving endeavor. Panoramic uses Elm, PureScript and Haskell, which are all Functional Programming Languages, the subject of his most recent book.