This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: ;;;; Lab 11 - Due 11/29 ;;;; ;;;; Filename: lab11.scm ;;;; ;;;; Name(s): ;;;; ;;;; ;;;; This file is organized as follows. The file is broken into parts for ;;;; each problem. The first part is an empty skeleton of the procedures ;;;; you are to right for that problem. After this the test cases ;;;; are defined, followed by a line that should look like ;;;; ;;;; ;(do-tests ...) ;;;; ;;;; Uncomment this line to run the test cases for that problem ;;;; and the display the resulting output. You are encouraged ;;;; to use this mechanism and add additional test cases of your ;;;; own. ; (define (reload) ; type (reload) into interpreter to reload this file (load "lab11.scm")) ;;; Set to #t if running in Dr. Scheme: (define dr-scheme? #f) ( ;;; Code used for testing just ignore this (define (do-tests n) ;;Multi arguments display (define (display+ . args) (for-each display args)) ;;Eval that works in MIT and STk (define (eval+ expression) (if (and (not dr-scheme?) (eqv? '#() '#())) (eval expression user-initial-environment) (eval expression))) (define (pretty-eval+ expression) (let ((return (eval+ expression))) (if (and (pair? expression) (eq? (car expression) 'define)) 'define-completed return))) (let* ((test-string (string-append "test-cases-step-" (number->string n))) (test-cases (eval+ (string->symbol test-string))))...
View Full Document
This note was uploaded on 01/11/2011 for the course CSCI 1901 taught by Professor Staff during the Fall '08 term at Minnesota.
- Fall '08