CSC104H1 Lecture Notes - Lecture 11: Association Football, Alonzo Church, Grace Hopper

33 views4 pages

Document Summary

;fill our databases with pictures (define database (list (list "ada lovelace" 1815 . ) (list "alan turing" 1912 . ) (list "alonzo church" 1903 . ) (list "grace hoppper" 1906 . ) (list "kurt goedel" 1906 . ) (list "miriam mann" 1907 . ))) > ;let us make sure that"s a list of lists, where each element has three elements. (check-expect (length (first database)) 3) > (check-expect (apply = (map length database)) #true) ;we will take a look at the new images in db, but first let"s make our database work less dependent on its "representation" ;"representation independence": our database happens to represent a person as: ;a list with a name, birth year, and photo, in that order. ;but the order is arbitrary: it is a property of our chosen "representation". Good software engineerning practice hides aspects, to make code clearer, less error-prone, and more adaptable/flexible. ;let us name the functions taht we used to extract each aspect of a person: (define name first)

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents