Книга: Functional Programming in JavaScript
Назад: 6. Advanced Topics and Pitfalls in JavaScript
Дальше: Tail recursion

Recursion

Recursion is very important to functional programming in any language. Many functional languages go so far as to require recursion for iteration by not providing and loop statements; this is only possible when tail-call elimination is guaranteed by the language, which is not the case for JavaScript. A quick primer on recursion was given in , Fundamentals of Functional Programming. But in this section, we'll dig deeper into exactly how recursion works in JavaScript.

Назад: 6. Advanced Topics and Pitfalls in JavaScript
Дальше: Tail recursion

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!)