CHAPTER 2

Methodology for Recursive Thinking

Science is much more than a body of knowledge. It is a way of thinking.

—Carl Sagan

WHEN thinking declaratively it is possible to design recursive algorithms for solving a wide variety of computational problems by following a systematic approach. This chapter describes a general template for deriving recursive solutions from a declarative perspective that unravels the process of recursive thinking into a sequence of steps. In addition, the chapter introduces several useful diagrams that programmers can utilize when designing recursive cases. These are beneficial since they force us to think about problem decomposition and induction, the two most important concepts underlying recursive (declarative) ...

Get Introduction to Recursive Programming 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.