Functional Problem Solving (CSC 151 2016S) : Outlines
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Taking Notes] [Rubric]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Labs] [Outlines] [Readings] - [Examples] [Handouts]
Reference: [Setup] [Remote] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Curtsinger (2016S)] [Davis (2013F)] [Rebelsky (2015F)] [Weinman (2014F)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
Held: Friday, 18 March 2016
Back to Outline 31 - Pause for Breath. On to Outline 33 - Naming Local Procedures.
Summary
We visit a slightly different kind of recursion, numeric recursion. In this technique, we once again have procedures call themselves. However, the parameter that we "simplify" at every step is a number, rather than a list.
Related Pages
Overview
Administrivia
While we've seen and written a variety of examples of direct recursion, they typically have the following form:
(define RECURSIVE-PROC
(lambda (PARAMS)
(if (BASE-CASE-TEST)
(BASE-CASE PARAMS)
(COMBINE (PART-OF PARAMS)
(RECURSIVE-PROC (SIMPLIFY PARAMS))))))
For lists, the simplification was almost always "take the cdr" and the "part-of" was almost always "take the car".