Principles of Programming Languages — Homework 11

Due by class time Thursday, October 24

  1. Download the file assign11.scm and use it as your starting point for this assignment. This is the code we developed in class today with support for 1-argument user-defined functions (fun1 expressions).

  2. Add support to the interpreter for 2-argument and 3-argument user-defined functions (i.e. fun2 and fun3 expressions), by filling in the sections in the code marked ...you...fill...this...in.... You will need to complete the definitions for fun2-expression?, fun3-expression?, and the corresponding lines in m that handle each of these types of expressions. However, you don't need to write any other code. A few examples of fun2 and fun3 expressions are provided at the end of the file.

  3. You can use the auto-tester to test your code by downloading hw11-tester.scm and auto-tester-base.scm and putting them in the same folder as assign11.scm. Then uncomment the line (require "hw11-tester.scm") at the top of assign11.scm and type (test:) at the DrRacket prompt.


Turning in Your Homework