Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering JavaScript Functional Programming

You're reading from   Mastering JavaScript Functional Programming Write clean, robust, and maintainable web and server code using functional JavaScript

Arrow left icon
Product type Paperback
Published in Jan 2020
Publisher Packt
ISBN-13 9781839213069
Length 470 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Federico Kereki Federico Kereki
Author Profile Icon Federico Kereki
Federico Kereki
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Technical Requirements
2. Becoming Functional - Several Questions FREE CHAPTER 3. Thinking Functionally - A First Example 4. Starting Out with Functions - A Core Concept 5. Behaving Properly - Pure Functions 6. Programming Declaratively - A Better Style 7. Producing Functions - Higher-Order Functions 8. Transforming Functions - Currying and Partial Application 9. Connecting Functions - Pipelining and Composition 10. Designing Functions - Recursion 11. Ensuring Purity - Immutability 12. Implementing Design Patterns - The Functional Way 13. Building Better Containers - Functional Data Types 14. Bibliography
15. Answers to Questions 16. Other Books You May Enjoy

To get the most out of this book

To understand the concepts and code in this book, you don't need much more than a JavaScript environment and a text editor. To be honest, I even developed some of the examples working fully online, with tools such as JSFiddle (at https://jsfiddle.net/) and the like, and absolutely nothing else.

In this book, we'll be using ES2019, Node 13, and the code will run on any OS such as Linux, Mac OSX, or Windows; please do check the Technical Requirements section, for some other tools we'll also work with.

Finally, you will need some experience with the latest version of JavaScript, because it includes several features that can help you write more concise and compact code. We will frequently include pointers to online documentation, such as the documentation available on the Mozilla Development Network (MDM) at https://developer.mozilla.org/, to help you get more in-depth knowledge.

Download the example code files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the Support tab.
  3. Click on Code Downloads.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Mastering-JavaScript-Functional-Programming-2nd-Edition-. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Let's review our once() function."

A block of code is set as follows:

function newCounter() {
let count = 0;
return function() {
count++;
return count;
};
}

const nc = newCounter();
console.log(nc()); // 1
console.log(nc()); // 2
console.log(nc()); // 3

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

function fact(n) {
if (n === 0) {
return 1;

} else {
return n * fact(n - 1);
}
}

console.log(fact(5)); // 120

Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select the EXPERIMENTAL option to fully enable ES10 support."

Warnings or important notes appear like this.
Tips and tricks appear like this.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image