Answers to all required parts should be typed.
The lab write-up should begin with the names and mailboxes of the students in the group, followed by the number and title of the exercise.
Answers to questions should appear in numerical order (e.g., answer to question 1, then answer to question 2, then answer to question 3, etc.).
While there is no need to repeat the question from a lab, each answer should be clearly numbered; the write-up should make clear which answer goes with what question.
Comments, observations, and explanations should be written as Scheme comments (with lines starting with semicolons).
Code should be written clearly and ready to run.
Sample tests and test results should be given for each required piece of code.
;;; Henry M. Walker ;;; Box Y-02 ;;; Sample Lab 1: Format for Required Laboratory Write-ups ;;; Exercise 1.6ace from Springer-Friedman ;; part a (cons 'one (cons 'two (cons 'three (cons 'four '())))) ;; testing: > (cons 'one (cons 'two (cons 'three (cons 'four '())))) ===> (one two three four) ;; part c (cons 'one (cons (cons 'two (cons 'three '())) (cons 'four '()))) ;; testing: > (cons 'one (cons (cons 'two (cons 'three '())) (cons 'four '()))) ===> (one (two three) four) ;; part e (cons (cons (cons 'one '()) '()) '()) ;; testing: > (cons (cons (cons 'one '()) '()) '()) ===> (((one))) ;;; Exercise 1.7 from Springer-Friedman ;The cons procedure is commonly used to insert an additional element ;at the head of a list. In this exercise, A is a value and ls is a ;list of n elements. Thus, (cons A ls) creates a list of n+1 ;elements: A is first on this new list, with the elements of ls ;following.
This document is available on the World Wide Web as
Henry M. Walker (email@example.com)