|
Projects
Spring 2010 Older Courses Fall 2009 Spring 2009
Fall 2008
Spring 2008
Fall 2007 HOWTOs |
OPLspr09 /
PS2Home Assignments Lecture Blog Resources Project Discussion Group 91.301 Organization of Programming Languages Out: Feb 2, 2009 Problem Set 2: Iterative vs. Recursive Processes and Higher-Order ProceduresWe will delve into the difference between iterative and recursive processes. A recursive procedure may actually invoke an iterative or recursive process! (Warning -- by the time you are done with this problem set, you will be sick of this topic. Sorry about that) Also we will study higher-order procedures. This is the idea of passing procedures as inputs to other procedures, and procedures that construct and output new procedures. What To Turn InIn a file named Put the problem number in a comment before the code for that problem. Scheme's comment character is a semi-colon; a comment may start anywhere on the line. Submit your solutions electronically by logging into Mercury and typing submit fredm 301-ps2 ps2-ans.ss
ReadingRead SICP, Section 1.2 and Section 1.3. You may skip 1.2.6, unless you are really enjoying the mathematics and number theory. The ProblemsMake sure you do the readings before or doing these!
Honors, Graduate Students, and Undergrads Looking for More12. SICP exercise 1.43 (pp. 77): Repeated application of procedures. |