Home

JavaScript Functional Programming

Higher-order functions - Part 1 of Functional Programming in JavaScript

Jun 21, 2015

In this video series, I will teach you how to do functional programming in JavaScript. In this first one, I will tell you about one of the most important concepts in functional programming: Higher-order functions. I will talk about what higher order-functions are, and then move on to code, and show you how to use them. I will also tell you why you should learn functional programming in the first place.

View Outline

Map - Part 2 of Functional Programming in JavaScript

Jun 28, 2015

In this video series, we learn how to do functional programming in JavaScript. In this second one, I show you how and when to use the higher-order function map, and why it is the best thing ever.

View Outline

Reduce basics - Part 3 of Functional Programming in JavaScript

Jul 5, 2015

In this video series, we learn how to do functional programming in JavaScript. In this third one, I show you how *reduce* fits into your toolbox and a basic example of it's usage.

View Outline

Reduce Advanced - Part 4 of Functional Programming in JavaScript

7/20/2015

In this video series, we learn how to do functional programming in JavaScript. In this fourth one, we spend a little bit more time on *reduce*. Playlist of full series is here: https://www.youtube.com/playlist?list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84 How to install and use io.js (for the arrow functions example) http://davidwalsh.name/es6-io You want to follow me on Twitter and Quora: https://twitter.com/mpjme http://www.quora.com/Mattias-Petter-Johansson

View Outline

Closures - Part 5 of Functional Programming in JavaScript

8/3/2015

A short video explaining the concept of closures, using JavaScript. This is part of a series, where are learning functional programming using JavaScript. Mozilla JavaScript documentation on Clousures https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures Code from the episode https://gist.github.com/mpj/b56371c672122a098d52 Playlist of full series https://www.youtube.com/playlist?list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84 You want to follow me on Twitter and Quora: https://twitter.com/mpjme http://www.quora.com/Mattias-Petter-Johansson

View Outline

Currying - Part 6 of Functional Programming in JavaScript

8/17/2015

A short video explaining the concept of curring, using JavaScript. This is part of a series, where are learning functional programming using JavaScript. Currying is when a function, instead of taking all arguments at one time, takes the first one and returns a new function that takes the second one and returns a new function which takes the third one, and so forth, until all arguments have been fulfilled. Curry function in lodash: https://lodash.com/docs#curry Playlist of full series https://www.youtube.com/playlist?list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84 You want to follow me on Twitter and Quora: https://twitter.com/mpjme http://www.quora.com/Mattias-Petter-Johansson

View Outline

Recursion - Part 7 of Functional Programming in JavaScript

8/24/2015

In this video, we are going to learn about recursion - what recursion is, how it works, and why it's useful. This video is part of a series - you'll get a lot more out of it if you watch the other episodes before watching this one. You can find them here: https://www.youtube.com/playlist?list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84 Recursion is when a function calls itself until it doesn't. That is seriously all recursion is. It's really simple. A lot of people think that recursion is hard. The reason people think that recursion is hard is because all explanations of recursion use fibonacci numbers as an example, which is the worst example ever. If somebody tries to explain recursion to you using fibonnaci numbers, you must murder them. I understand that sounds rough, because they mean well, but we really need to get rid of that, because it makes everyone think that recursion is hard, when it is actually easy.

View Outline