Skip to Content
Mastering JavaScript Functional Programming
book

Mastering JavaScript Functional Programming

by Federico Kereki
November 2017
Intermediate to advanced
386 pages
9h 22m
English
Packt Publishing
Content preview from Mastering JavaScript Functional Programming

Containers

Back in Chapter 5, Programming Declaratively - A Better Style, and later in Chapter 8, Connecting Functions - Pipelining and Composition, we saw that the ability of being able to apply a mapping to all the elements of an array, and, even better, being able to chain a sequence of similar operations, was a good way to produce better, more understandable code.

However, there is a problem: the .map() method (or the equivalent, demethodized one, as in Chapter 6, Producing Functions - Higher-Order Functions), is available only for arrays, and we might want to be able to apply mappings and chaining to other data types. So, what can we do?

Let's consider different ways of doing this, which will give us several new tools for better functional ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering JavaScript Functional Programming - Second Edition

Mastering JavaScript Functional Programming - Second Edition

Federico Kereki

Publisher Resources

ISBN: 9781787287440Supplemental Content