Book Image

Mastering JavaScript Functional Programming

By : Federico Kereki
Book Image

Mastering JavaScript Functional Programming

By: Federico Kereki

Overview of this book

Functional programming is a programming paradigm for developing software using functions. Learning to use functional programming is a good way to write more concise code, with greater concurrency and performance. The JavaScript language is particularly suited to functional programming. This book provides comprehensive coverage of the major topics in functional programming with JavaScript to produce shorter, clearer, and testable programs. You’ll delve into functional programming; including writing and testing pure functions, reducing side-effects, and other features to make your applications functional in nature. Specifically, we’ll explore techniques to simplify coding, apply recursion for loopless coding, learn ways to achieve immutability, implement design patterns, and work with data types. By the end of this book, you’ll have developed the JavaScript skills you need to program functional applications with confidence.
Table of Contents (22 chapters)
Title Page
About the Author
About the Reviewer
Customer Feedback
Connecting Functions - Pipelining and Composition
Answers to Questions


In this chapter, we went over several ways of defining functions in JS, focusing mainly on arrow functions, which have several advantages over standard functions, including being more terse. We showed the concept of currying (which we'll be revisiting later), considered some aspects of functions as first class objects, and we finally considered several JS techniques that happen to be fully FP in concept.

In Chapter 4 , Behaving Properly - Pure Functions, let's delve even more deeply into functions, and thus introduce the concept of pure functions, which will lead us to even better style programming