{\rtf1\ansi\deff1\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman{\*\falt Thorndale};}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\froman\fprq2\fcharset0 Times New Roman;}{\f3\fmodern\fprq1\fcharset0 Courier New;}{\f4\fswiss\fprq2\fcharset0 Arial Unicode MS;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\snext1 Default;}
{\s2\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext2 Text body;}
{\s3\sb240\sa120\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs28\lang1033\ltrch\dbch\afs28\langfe1033\loch\fs28\lang1033\sbasedon1\snext2 Heading;}
{\s4\li360\ri0\fi-360\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext4 List;}
{\s5\li720\ri0\fi-360\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext5 List 2;}
{\s6\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext6 Header;}
{\s7\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon2\snext7 Table Contents;}
{\s8\sa120\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ai\ab\ltrch\dbch\af1\afs20\langfe1033\ai\ab\loch\f1\fs20\lang1033\i\b\sbasedon7\snext8 Table Heading;}
{\s9\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext9 Index;}
{\s10\sb240\sa60\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs32\lang1033\ab\ltrch\dbch\afs32\langfe1033\ab\loch\fs32\lang1033\b\sbasedon1\snext11 Title;}
{\s11\sa60\cf0\qc{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs24\lang1033\ltrch\dbch\afs24\langfe1033\loch\fs24\lang1033\sbasedon1\snext2 Subtitle;}
{\s12\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe255\loch\f1\fs24\sbasedon1\snext12 Normal;}
{\s13\sb240\sa60\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs28\lang1033\ab\ltrch\dbch\afs28\langfe1033\ab\loch\fs28\lang1033\b\sbasedon1\snext1 heading 1;}
{\s14\keepn\cf1{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ab\ltrch\dbch\af1\afs20\langfe255\ab\loch\f1\fs20\b\sbasedon12\snext12 heading 2;}
{\s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext15 header;}
{\s16\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\sbasedon1\snext16 footer;}
{\s17\sb120\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ai\ltrch\dbch\af1\afs20\langfe1033\ai\loch\f1\fs20\lang1033\i\sbasedon1\snext17 caption;}
{\s18\cf1{\*\tlswg8236}\tx916{\*\tlswg8236}\tx1832{\*\tlswg8236}\tx2748{\*\tlswg8236}\tx3664{\*\tlswg8236}\tx4580{\*\tlswg8236}\tx5496{\*\tlswg8236}\tx6412{\*\tlswg8236}\tx7328{\*\tlswg8236}\tx8244{\*\tlswg8236}\tx9160{\*\tlswg8236}\tx10076{\*\tlswg8236}\tx10992{\*\tlswg8236}\tx11908{\*\tlswg8236}\tx12824{\*\tlswg8236}\tx13740{\*\tlswg8236}\tx14656{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af4\afs20\langfe1033\loch\f4\fs20\sbasedon12\snext18 HTML Preformatted;}
{\*\cs20\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon31 Numbering Symbols;}
{\*\cs21\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 1;}
{\*\cs22\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 2;}
{\*\cs23\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 3;}
{\*\cs24\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 4;}
{\*\cs25\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 5;}
{\*\cs26\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 6;}
{\*\cs27\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 7;}
{\*\cs28\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 8;}
{\*\cs29\cf0\chcbpat1\rtlch\af1\afs24\lang1033\ltrch\dbch\af1\afs24\langfe1033\loch\f1\fs24\lang1033 RTF_Num 2 9;}
{\*\cs30\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe1033\loch\f1\sbasedon31 Default Paragraph Font;}
{\*\cs31\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1 Normal;}
{\*\cs32\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon31 WW-Default Paragraph Font;}
{\*\cs33\cf1\rtlch\af1\lang1033\ltrch\dbch\af1\langfe255\loch\f1\sbasedon32 page number;}
}
{\info{\creatim\yr2002\mo10\dy2\hr22\min13}{\operator Sharon Tuttle}{\revtim\yr2002\mo10\dy11\hr16\min1}{\printim\yr1601\mo1\dy1\hr0\min0}{\comment StarWriter}{\vern6410}}\deftab720
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1400\margbsxn720\headery0{\*\headeryb283\headerxl0\headerxr0\headeryh0}{\header \pard\plain \s6\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033 
\par }
\pgdscnxt0 Default;}
{\pgdsc1\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn709\margbsxn720\headery0{\*\headeryb283\headerxl0\headerxr0\headeryh0}{\header \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033{\ltrch\loch\f1{\fs16 CS 131 - Homework #6\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 2}}}}
\par \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs16\ltrch\dbch\afs16\loch\fs16 {\ltrch\loch\f1 Fall 2002}
\par }
\pgdscnxt1 Convert 1;}}
{\*\pgdscno1}\paperh15840\paperw12240\margl1440\margr1440\margt709\margb720\sectd\sbknone\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1348\margbsxn720\headery709{\header \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033{\ltrch\loch\f1{\fs16 CS 131 - Homework #6\tab \tab p. {\field{\*\fldinst \\page}{\fldrslt 2}}}}
\par \pard\plain \s15\cf0{\*\tlswg8236}\tqc\tx4320{\*\tlswg8236}\tqr\tx8640{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\rtlch\afs16\ltrch\dbch\afs16\loch\fs16 {\ltrch\loch\f1 Fall 2002}
\par }
\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\qc\rtlch\ab\ltrch\dbch\ab\loch\b {\ltrch\loch\f1 CS 131 - Intro to Computer Science I - Fall 2002}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\qc\rtlch\ab\ltrch\dbch\ab\loch\b {\ltrch\loch\f1 Homework #6}
\par {\ltrch\loch\f1 DUE: Friday, October 19th, by {\ul 5:00 pm}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033 
\par {\ltrch\loch\f1 You may work in pairs on this assignment, or individually. Please note, however, the following requirements if you work in a pair:}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 *\tab You must do the whole assignment {\i together}, as a pair (you may not split up the parts, do them individually, and then turn in the combination, for example.)}
\par {\ltrch\loch\f1 *\tab By working in a pair, I mean that both of you are sitting at the {\i same} computer, with one typing ("driving") and the other suggesting/reading over what has been done and what should be done next ("navigating"). The driver and navigator should SWITCH roles
 about every half hour.}
\par {\ltrch\loch\f1 *\tab If you do this, you turn in a single copy of the assignment with both of your names on the first line.}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033 {\ltrch\loch\f1 As before, you will turn in certain function definitions and expressions that you have typed into the DrScheme definitions window and saved into one or more file names ending in {\b .scm} .}
\par 
\par {\ltrch\loch\f1 The program recipe in effect for this homework is the {\b 10-11 version}{\b0 , which now requires a brief description at the end of each data definition (especially for structures, and if the meaning is not clear for "supertype"-style and list-style data definitions
). Please let me know if you have any questions about this latest program recipe version.}}
\par 
\par {\ltrch\loch\f1 The same general class style guidelines still apply, also:}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 *\tab choose meaningful function, parameter, and variable names.}
\par {\ltrch\loch\f1 *\tab use auxiliary functions whenever they are appropriate.}
\par {\ltrch\loch\f1 *\tab reuse functions whenever possible and appropriate. If a function has already been defined for a previous problem within the same definitions file, you may simply use it in a later problem's function.}
\par {\ltrch\loch\f1 *\tab define constant values in your functions as named variables written in all capital letters; for example,}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\f3 {\ltrch\loch\f3 \tab (define CRUST-WIDTH 1)}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 *\tab a data definition is not repeated for every function that uses that data; the data definition is only given once in a particular Scheme file. The template for that data definition only has to appear once, as well; HOWEVER, if you find it helpful, you may
 repeat that template before each appropriate function body for which you find that template useful.}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\f3 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 In particular: please note that a problem may ask you to write a particular function. When it is appropriate, you should {\b also} write unspecified auxiliary functions that you decide are useful in writing the specifically-requested function.}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\f3\fs20 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435{\ltrch\loch\f1{\f1 1.\tab (Adapted from Stephen Bloch's section of Adelphi's CS 160, Spring 2002)}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 \tab Develop a function {\b count-dolls}{\b0  that takes in a list of symbols, and returns how many times the symbol }{\b 'doll }{\b0 occurs in the list. }}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 
\par {\ltrch\loch\f1 \tab Then, develop a function {\b count-sym }{\b0 that takes in a symbol and a list of symbols, and returns how many times that symbol occurs in the list.}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 2.\tab Do exercise 9.5.3 on p. 136 of \ldblquote How to Design Programs (HtDP)\rdblquote . Note that you are really being asked to write {\b two}{\b0  functions --- first, the more-specific }{\b dollar-store?}{\b0 , then the more general version that takes a threshhold price as well as the list of pr
ices all expected to be under the threshhold.  (Go ahead and name this second function }{\b all-under-amt?}{\b0 )}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435
\par {\ltrch\loch\f1{\f1 3.}\tab {\fs20\f1 (Adapted from Keith Cooper's section of Rice University's COMP 210, Spring 2002)}}
\par {\ltrch\loch\f1{\b0\f1 \tab Write down a data definition for lists of numbers. Then, develop the following programs that consume a list of numbers:}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 {\ltrch\loch\f1 a.\tab A function {\b summation }{\b0 that returns the sum of all of the numbers in the list.}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435 
\par {\ltrch\loch\f1 b.\tab A function {\b all-positive?} that returns {\b true} if and only if every number in the list is greater than or equal to 0. (Yes, please note that we are including 0 as a positive number here, even though it is not always defined to be.)}
\par 
\par {\ltrch\loch\f1 c.\tab A function {\b count-positives} that returns the number of positive numbers in the list.}
\par 
\par {\ltrch\loch\f1 d.\tab A function {\b mostly-positive} that returns true if the list contains more positive numbers (>=0) than  negative numbers (<0).}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435 {\ltrch\loch\f1 4.\tab {\fs20\f1 (Adapted from Keith Cooper's section of Rice University's COMP 210, Spring 2002)}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\fs20 {\ltrch\loch\f1 \tab {\b Digital Telephone Directory}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\fs20\b {\ltrch\loch\f1 \tab }
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\fs20 {\ltrch\loch\f1 \tab Once a year, the campus telephone department publishes a directory. For our purposes, the directory is a list of pairs. The pair consists of a symbol, called the key, and a phone number, represented as a 4-digit number (an extension, you see).}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li855\ri0\fi-435\ltrch\loch\fs20 {\ltrch\loch\f1 a.\tab Write out the data definitions for this simple on-line phone directory. You should have one data definition for pairs and a second data definition for directories.}
\par 
\par {\ltrch\loch\f1 b.\tab Write a program {\b lookup} that consumes a symbol and a phone directory and produces a phone number. The program {\b lookup} should examine the list for a key that matches the symbol given as input. If it finds a key that matches the input symbol, it returns tha
t key's corresponding phone number. If no matching record is found, {\b lookup} should return 0.}
\par 
\par {\ltrch\loch\f1 Schemers sometimes call a directory in this form an {\b association list}.}
\par 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\fs20 {\ltrch\loch\f1 5.\tab Do exercise 9.5.6 on p. 137 of \ldblquote How to Design Programs (HtDP)\rdblquote .}
\par 
\par {\ltrch\loch\f1 6.\tab Do exercise 9.5.7 on p. 137 of \ldblquote How to Design Programs (HtDP)\rdblquote . Note the {\b Iterative Refinement} hint! For this problem, I only want you to turn in the final, checked version of the function {\b average-price}{\b0 .}}
\par 
\par {\ltrch\loch\f1{\b0 7.\tab Do exercise 9.5.8 on p. 137 of \ldblquote How to Design Programs (HtDP)\rdblquote . Note that it assumes an already-open canvas.}}
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li420\ri0\fi-435\ltrch\loch\f3 
\par \pard\plain \s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\aspalpha\rtlch\af1\afs20\lang1033\ltrch\dbch\af1\afs20\langfe1033\loch\f1\fs20\lang1033\li450\ri0\fi-435 {\ltrch\loch\f1 When you are done with problems 1-7, save your definitions window(s) contents using the "Save Definitions" command under the File menu. E-mail the contents of this saved file (or these saved files) to {\b st10@humboldt.edu}, either by cut-and-paste or attachmen
t or whatever is easiest for you. Make the subject line of your message {{\b 131hw04 }{\b0 (and if you break them up into multiple files, alter the mail's Subject: line accordingly).}}}
\par }