Functional Programming

for Swift Developers

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



Enroll NOW and get first week for FREE


[🌽, 🐮, 🐔].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. And it's free... What are you waiting for?

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 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
  • Fold
  • FlatMap
  • Zip, Foreach, Sort/ed

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


Enroll NOW and get first week for FREE

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.

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 Swift, but I know how to code in X

Awesome! Swift 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.

And if you already know Objective-C, then it will be even easier for you: this is the perfect excuse to learn Swift!

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



Enroll NOW and get first week for FREE