9
Designing Functions – Recursion
In Chapter 8, Connecting Functions, we considered yet more ways to create new functions out of combining previous existing ones. Here, we will get into a different theme: how to design and write functions in a typically functional way, by applying recursive techniques.
We will be covering the following topics:
- Understanding what recursion is and how to think in order to produce recursive solutions
- Applying recursion to some well-known problems, such as making a change or the Tower of Hanoi
- Using recursion instead of iteration to re-implement some higher-order functions from earlier chapters
- Writing search and backtrack algorithms with ease
- Traversing data structures, such as trees, to work with filesystem directories ...
Get Mastering JavaScript Functional Programming - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.