Functions Without Borders
Unbounded recursion is when we can’t predict the number of repetitions for a recursive function. For example, it’s hard to predict how many iterations a web crawler that navigates and downloads web pages will have. For each page it browses, it finds new links to crawl. Since we’re not the owners of the pages, we can’t predict how many links each page will have. For every page the crawler downloads, the list of pages that needs to be crawled can increase. The web crawler also needs to be cautious with pages it has already visited so it avoids circular references and infinite recursion. All these characteristics of the web crawler represent unbounded recursion challenges, and a functional programmer must be prepared to ...
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.
Read now
Unlock full access