Next lesson playing in 5 seconds

  • Overview
  • Transcript

5.1 Conclusion

I hope you’ve enjoyed this introduction to functional programming through concepts like pure functions and higher-order functions, and have learned some of the benefits of making small, focused, reusable functions to do the work of your application. I’ll close out the course with a few suggestions for next steps, if you’re still curious. My name is Jason and from all of us here at Tuts+, thanks for watching.

Related Links

5.1 Conclusion

Okay, so this is where we wrap up the course. And to do that, I'm just going to quickly remind you of what we've gone over and then give you some things to think about moving on. Basically, I think we can wrap it up like this. Be declarative, which means make more functions. Make small functions, so that we can glue them together using composition, like either with the mean function here where we're using several other functions to make another one. And try whenever you can to make pure functions that take parameters and return values. So don't have them do things, instead, have them process something that you've given it and then return it for you to do something with later. And if you can kind of stick to those couple of guidelines, you're well on your way to understanding what makes functional programming so great. Now, we didn't get into the philosophy of functional programming, and we left out a few key concepts. And we did this on purpose just to kind of get you excited about the ideas. But I think if you are excited I want to leave you with just a couple things you can do, a couple places you can dig deeper and, and kind of move on into the next stage of functional programming learning. So first, kind of obvious, but I wanna say, learning everything you can about the function in JavaScript is gonna help you a lot. Learning what the prototype is. Learning what and apply and bind are. And what the value of this is. How to affect that value, why you might not want to, all those things are really interesting and will help you understand how to use functions. Second, I'll mention immutability, which is a really important concept in functional programming. It means that things shouldn't change. Immutable.js is a library that Facebook wrote for their, out of their work they did with React. And so if you look through this and play with it, you'll start to get an understanding of what immutability is and why it's important. The last thing I'll mention is something called lazy evaluation, which was added to lodash in version 3.0. And this is a concept that's been in functional programming for a long time. It's a good performance boost, and it's also just a better way to chain methods together. And so reading about this is another great thing you can do if you want to dig more into functional programming. That was a quick look. The point here is really just to say, there's a lot more to functional programming than we've been able to cover in this course. I hope that this course has created some excitement and made it seem practical and interesting, and I hope that you spend some time looking into it more. Good luck.

Back to the top