代写 data structure Scheme lisp CSE 465/565

CSE 465/565
Spring 2019
Homework #2

Notes:
• Several Scheme files are provided for you – hw2S19.scm, hw2S19test.scm, and zipcodes.scm.
• You can copy on lnx01 these using: $ cp -r ~zmudam/CSE465-565/HW2S19 .
• When writing the functions, the name and parameters must appear exactly as they appear in hw2S19.scm.
• Do not perform any output in hw2S19.scm
• Read the comments in hw2S19.scm for a description of what these functions should do.
• Two point values are shown. The first one is for 465 students and the second one is for 565 students.
• In a PDF file, include:
• The answers to the textbook questions
• The output produced by the original hw2S19test.scm and your completed hw2S19.scm.
• A short description of what works and what does not.
• Submit a zip file that contains hw2S19.scm and your PDF

• (20/10) Answer the following review questions from the 12th edition of the textbook (11th edition has same problem numbers):
• 15.4 – In what common data structure are Lisp lists normally stored?
• 15.5 – Explain why QUOTE is needed for a parameter that is a data list.
• 15.9 – What are the differences between =, EQ?, EQV?, and EQUAL?
• 15.14 – If CONS is called with two atoms, say ‘A and ‘B, what is the returned?
• 15.16 – What are the differences between CONS, LIST, and APPEND?
• (16/6) Basic processing
• (8/4) quadradic
• (8/2) minutesBetween
• (45/40) List processing
• (9/4) negatives
• (9/8) reverse
• (9/8) isFlatListOfNumbers
• (9/4) minAndMax
• (9/8) crossProduct
• (0/8) replace
• (11/28) Application
• (6/0) getLatLon
• (5/14) getStatesThatContainThisCity
• (0/14) getDistanceBetweenZipCodes
• (8/16) Functionals
• (8/8) simpleFilter
• (0/8) complexFilter