Jump to ratings and reviews
Rate this book

Mastering JavaScript Functional Programming: Write clean, robust, and maintainable web and server code using functional JavaScript, 2nd Edition

Rate this book
Explore the functional programming paradigm and the different techniques for developing better algorithms, writing more concise code, and performing seamless testing

Key FeaturesExplore this second edition updated to cover features like async functions and transducers, as well as functional reactive programmingEnhance your functional programming (FP) skills to build web and server apps using JavaScriptUse FP to enhance the modularity, reusability, and performance of appsBook DescriptionFunctional programming is a paradigm for developing software with better performance. It helps you write concise and testable code. To help you take your programming skills to the next level, this comprehensive book will assist you in harnessing the capabilities of functional programming with JavaScript and writing highly maintainable and testable web and server apps using functional JavaScript.

This second edition is updated and improved to cover features such as transducers, lenses, prisms and various other concepts to help you write efficient programs. By focusing on functional programming, you'll not only start to write but also to test pure functions, and reduce side effects. The book also specifically allows you to discover techniques for simplifying code and applying recursion for loopless coding. Gradually, you'll understand how to achieve immutability, implement design patterns, and work with data types for your application, before going on to learn functional reactive programming to handle complex events in your app. Finally, the book will take you through the design patterns that are relevant to functional programming.

By the end of this book, you'll have developed your JavaScript skills and have gained knowledge of the essential functional programming techniques to program effectively.

What you will learnSimplify JavaScript coding using function composition, pipelining, chaining, and transducingUse declarative coding as opposed to imperative coding to write clean JavaScript codeCreate more reliable code with closures and immutable dataApply practical solutions to complex programming problems using recursionImprove your functional code using data types, type checking, and immutabilityUnderstand advanced functional programming concepts such as lenses and prisms for data accessWho this book is forThis book is for JavaScript developers who want to enhance their programming skills and build efficient web applications. Frontend and backend developers who use various JavaScript frameworks and libraries like React, Angular, or Node.js will also find the book helpful. Working knowledge of ES2019 is required to grasp the concepts covered in the book easily.

Table of ContentsBecoming Functional - Several QuestionsThinking Functionally - A First ExampleStarting Out with Functions - A Core ConceptBehaving Properly - Pure FunctionsProgramming Declaratively - A Better StyleProducing Functions - Higher-Order FunctionsTransforming Functions - Currying and Partial ApplicationConnecting Functions - Pipelining and CompositionDesigning Functions - RecursionEnsuring Purity - ImmutabilityImplementing Design Patterns - The Functional WayBuilding Better Containers - Functional Data Types

768 pages, Kindle Edition

Published January 24, 2020

23 people are currently reading
19 people want to read

About the author

Federico Kereki

7 books14 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
2 (25%)
4 stars
4 (50%)
3 stars
2 (25%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 3 of 3 reviews
Profile Image for Marek Sirkovský.
49 reviews2 followers
February 9, 2022
I liked this book. The author nicely described the main aspects of functional programming and presented them using examples in JS.
I am not sure if it is good for a beginner. The author sometimes wanted to be really precise, so they used not-so-well-known terms from category theory and math. Even with included description, it can be a bit overwhelming if you are new to FP.
On the other hand, even though I had already read some books about FP, I learned something new.
Profile Image for Sebastian Maldonado.
20 reviews
August 31, 2020
Excelente libro introductorio

Este es un excelente libro de introducción a la programación funcional, los capítulos finales tienen un salto muy grande que lo hace difícil de seguir, pero con apoyo de internet se puede entender lo que el autor trata de explicar
Profile Image for Steve.
2 reviews1 follower
March 17, 2024
Sufficient, but disappointing

I suppose it’s a decent book for those that are new to Javascript and functional programming, especially if your’re interested in Typescript. I was hoping to get more out of the sections dealing with Functors and Monads, but the book fell short in this area.

Yes, the explaination sufficent and dumbed down enough to understand, but lacking enought pactical application to real world problems to full grasp their benefits.

I felt there was too much “Do as I say, not as I do” in the book. For example the section on binary trees, shows a bunch of assertions into the tree is a series of mutations on the tree variable. A seasoned functional programmer would never do THIS, so I don’t understand why the author would in a book teaching FP. This should shave been written as a pipe. ie `const newTree = pipe(insert(5), insert(7), insert(3))(tree)`.

The author appears very knowlegable, but seems to lack real experiece.

Finally, the mixing of Javascript and Typescript in the examples was very distracting. I would have much preferred that all the examples were given in javascript with Typescript annotations where applicable. All Typescript programmers can read Javascript, but many Javascript devlopers find reading Typescript distracting and tedious IMHO.

In the end, it wasn’t worth the price for my purpose.
Displaying 1 - 3 of 3 reviews

Can't find what you're looking for?

Get help and learn more about the design.