Книга: Functional Programming in JavaScript
Назад: Putting it all together
Дальше: 5. Category Theory

Summary

JavaScript is a beautiful language.

Its inner beauty really shines with functional programming. It's what empowers its excellent extendibility. Just the fact that it allows first-class functions that can do so many things is what opens the functional flood gates. Concepts build on top of each other, stacking up higher and higher.

In this chapter, we dove head-first into the functional paradigm in JavaScript. We covered function factories, currying, function composition and everything required to make it work. We built an extremely modular application that used these concepts. And then we showed how to use some functional libraries that use these same concepts themselves, namely function composition, to manipulate the order of execution.

Throughout the chapter, we covered several styles of functional programming: data generic programming, mostly-functional programming, and functional reactive programming. They're all not that different from each other, they're just different patterns for applying functional programing in different situations.

In the previous chapter, something called Category Theory was briefly mentioned. In the next chapter, we're going to learn a lot more about what it is and how to use it.

Назад: Putting it all together
Дальше: 5. Category Theory

bsn
thank
Vesa Karvonen
I hope you don't mind, but I’d like to point you and your readers to my high-performance optics library for JavaScript that is in production use in multiple projects, has comprehensive support for partial optics and interactive documentation: https://calmm-js.github.io/partial.lenses/ (this takes a moment to load — be patient!)