CISC 121 Lecture Notes - Lecture 33: Functional Programming, Complex Instruction Set Computing, Big O Notation

41 views3 pages
Verified Note

Document Summary

The mechanics of mutual recursion are the same as for non-mutual recursion, except that the stack frames will alternate between those belonging to f1, and those belonging to f2. It is, of course, possible to have three or more functions involved in mutual recursion, but i have not seen an example that uses more than two functions in an application. According to wikipedia, mutual recursion is most used in functional programming. Python 3 has features suitable for implementing programs in a functional style, but functional programming is not covered in this course (wait for cisc 260). A classic recursion example is a solver for a mathematics puzzle from the 1880s (but pretending to be much older) for moving a stack of disks from one pole to another. It"s known as towers of hanoi, though it has nothing at all to do with any place named hanoi.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents