Extend the code in call-by.ss to add
call-by-need and call-by-value-result parameter passing. In
particluar, you should define the procedures call-by-need
and call-by-value-result which, when applied to no
arguments, will change the behavior of the interpreter.
In addition, write an expression that returns a different answer
in each of the five parameter-passing mechanisms. Bind this
expression to the variable test-case:
> (define test-case 'exp)
Write your answers to the exercises in a file (with comments, following the proper indentation rules), and send that file to
c311@lakshmi.cs.indiana.eduwith the subject line
12Assuming you've saved your homework in the file ``asgn.ss'' in the current directory, one way to submit is with the command:
Mail -s "12" c311@lakshmi.cs.indiana.edu < asgn.ss
remember to include the line
(load "record.ss")
at the beginning of your file.
Back to the c311 page
ehilsdal@cs.indiana.edu