Functional Programming

for JavaScript Developers

Learn the main concepts of functional programming using JavaScript in a simple and practical way

Subscribe now and get 25% off when the course is ready!



[🌽, 🐮, 🐔].map(cook) == [🍿, 🍔, 🍳]


  • Are you stuck in filter or map?
  • Are you tired of reading that "A monad is just a monoid in the category of endofunctors"?
  • Do you think that functional programming is too abstract and academic for your taste?

If you answered YES to any of those questions, then this is the couse you're looking for 😉

Course contents

As any great story, we need to start from the very begining. In order to warm engines, we'll see what functional programming is and what their basic principles are.

  • What is functional programming?
  • Mutable State Sucks
  • How to become stateless
  • Declarative Style
  • Functions without Side Effects
  • Lazy Evaluation
  • Type Systems
  • Recursion
  • Higher Order Functions
  • Functional Patterns
In this week, you're already prepared to start going deeper. Since ages, recursion has been considered the ugly guy. Some (very) bad teachers encourage against it, saying that it's even worse than Comic Sans. In this week we're going to see that it's not as bad as some say, but it's one of the most powerful tools in programming in general (and in functional programming in particular). You need to learn some tricks to use it properly, and then you'll be ready to forget your loops forever...

  • Recursion
  • Recursive Functions
  • Tail Recursion and Tail Call Optimization
Functions are the cornerstone of functional programming. You already guessed it... In this week you'll learn new ways to deal with functions, not just to group code together, but to combine and compose several functions to create higher abstractions. You'll get the most from your functions
  • Functions as First Class Citizens
  • Lambdas
  • Partial Applications and Currying
  • Continuation Passing Style
  • Functions Composition
  • Creating expressions
  • Play combine learn
We're sure you already use stream's map or reduce functions, but you're not so sure about how to use them properly or how they're implemented internally. Let's master these "functional functions" like nobody before
  • map
  • filter
  • reduce
  • flatMap
  • forEach, sorted, skip, concat...

Week 5: Functors

There you go! After some weeks of functional programming exposure, we're ready to dive into the first weird concept. But don't worry, it's not as hard as it looks: you'll learn what a "functor" is and you'll realize that you've been using functors for some time without realizing it!
  • Functor Option
  • Collection Functor
  • Result Functor

Week 6: Monoids

It wasn't so hard, was it? Now you're going to learn your second functional pattern: the monoid. For that, we're going to implement a small library for validations following all your brand-new knowledge...
  • Monoids
  • Use return values
  • Combine AND validate
  • Combine validatORs
  • Semigroup
  • Monoid is not an insult

Week 7: Monads

Finally! If you at some point have been scared about functional programming, chances are monads are the cause. After this week, you finally don't be scared anymore, and you'll learn how monads work, how to use them, and how to create your own ones! And most important, at the end you'll realize that "monads are just monoids in the category of endofunctors". It's true!
  • What is a monad?
  • Your Results are monads

Week 8: Applicatives

Now that you know what a monad is, let's go for other powerful functional pattern: the applicative.
  • What is an Applicative?
  • Applicative for Validation
  • This is just a mess!

Weeks 9 & 10: Mixing everything together

After these 8 weeks, you've learnt a lot of new (and old) concepts. Some of them are so powerful that you'll need weeks (or even months) of practice to be proficient enough. So, in order to accelerate your learning, now we're going to use all those concepts together, in a new library to deal with asynchronous code: we're going to create the Future.
  • Won't somebody please think of the asychronous code?
  • Functor-ize the Future
  • Monad-ize the Future
  • Applicat-ize the Future
  • Won't somebody please think of the sychronous code?
  • Validations
  • Operators of the Future
  • Final Touches

Subscribe now and get 25% off when the course is ready!

And if you still has some questions, maybe this can be helpful:

Why should I learn functional programming?

Well, let's say it will give you more tools to be a better programmer, no matter what programming language you use.
Maybe you can't use FP in your daily basis (yeah, your boss is a dinosaur), but we're sure that if you learn these concepts, your programming style will improve A LOT.

And why should I use JavaScript to learn functional programming?

Did you know that Mocha (then called LiveScript, Javascript and now ECMAScript) was created to be the "Scheme in the browser"? Since Scheme is a dialect of Lisp, functional programming and Javascript has much more in common than what you would think. Javascript used to be the language of the Web, but in these days, it's much more than that. You can use Javascript eveywhere, from browsers, servers, mobile devices and even IoT devices. If you're a Javascript developer, it seems that you did a very good investment learning it! With the skills you will learn in this course you would develop functional software in any platform and even be able to share code between them. With Javascript you can learn functional programming in a practical way: familiar syntax, useful day-to-day examples and out-of-the-box functional constructions make it the perfect language to learn functional programming.*

But, are you sure this is really useful?

Sure thing! Some benefits of programming with functional style:

  • It will allow you to make some tasks that would be must harder using your traditional style. Notice that Google used some functional core concepts from the very begining.
  • Your code will be cleaner, with (much) less variables, and you wouldn't worry by "what if this is null"
  • Your code will be more robust, will much less errors. The compiler will detect much more errors for you following the functional style. Also, your coding style will allow you to detect errors faster and easier.
  • Your code will be more maintainable and adaptable. As Joe Armstrong said, the inventor of Erlang, with OOP you wanted a banana but what you got was a gorilla holding the banana and the entire jungle.

Is it going to be difficult?

It's not difficult, it's quite simple. But it's different to the OOP style, that you're probably used to. Rich Hickey, the inventor of Clojure, explained in his famous talk "Simple made Easy" the difference between "easy" (something you're use to, even though it's a mess) and "simple" (something that can be explained and understood quickly, without effort, even though it may be quite new for you).

Functional programming is simple, but even you're an experienced developers, you'll have to learn scratch. But we're sure that this isn't anything for PhD's, as you probably believed. But you'll have to invest enough effort: no pain, no gain, my friend...

How are you going to teach it?

Using short video lessons, less than 20 minutes, where you'll find explanations about specific concepts and techniques. They're usually simple concepts, but with a lot of uses and potential applications. Don't worry if you don't get it at first. That's normal, and you'll probably have to listen some videos more than once, in order to understand all the details.
Each video includes several practical and everyday examples. We won't talk about fibonacci, factorials and other mathematical examples. We'll use daily situations and challenges, but solved differently. And if next you want to jump into pure functional languages, it will be much easier for you.

I don't know JavaScript, but I know how to code in X

Awesome! JavaScript is just the vehicle, but the important thing is the payload. Our code is quite easy to read and we use the simplest features of the language. It's in fact a good way to be introduced in a new language from a different side: instead of focusing on the syntax, focusing on the style.

Is there any other requirement?

Not really: you need to know how to code in any language (better if it's an OOP language), and you need to be interested in learning functional programming.

And it's even better if you already tried to learn FP without success. After this couse, you'll realize it wasn't that difficult

Subscribe now and get 25% off when the course is ready!

We're working on the course, so subscribe now and you'll get 25% off as soon as it's ready!