To make an interpreter with "load", use the sed as follows sed -f how-to-make-with-load.sed < chap1.p >chap1-with-load.p. After running sed, you have to check all the places where the output says "EDIT THIS". For Chapter 1, you only have to delete some stuff at the end. For APL, you have to do some more work to return a 0. For Scheme the changes would be more substantial to r_e_p_l. This might not work at all for Prolog. A high-level view of the changes are as follows: - I made a separate procedure r_e_p_l for the read-eval-print-loop. it takes a text-file as an argument, and does most of the work formerly in the main program's body. - To allow for nesting of loads, the userinput array, pos, and other globals having to do with input must be local to r_e_p_l. This necessitates r_e_p_l enclosing the input (r), evaluation (e), and printing (p) procedures. Hence r_e_p_l starts right before the INPUT section, and ends at before the main program body. - Since the main program has to initialize the globalEnv variable, emptyEnv was moved to the DATA STRUCTURE OP section, after mkEnv. It's a "constant operation" anyway (:-). - Similarly for Scheme and SASL, you will have to move bindEnv into the DATA STRUCTURE OP section. - Load is a control operation, so the usual things need to be done to add a control operation. Caveats Some things don't work well with SASL, since there is only one control operation in SASL and the code takes advantage of that fact.