CS115 Study Guide - Final Guide: Binary Tree, Binary Search Tree, Advanced Land Observation Satellite

13
CS115 Full Course Notes
Verified Note
13 documents
Document Summary
Structures: a structure bundles data in a package together, serves as a useful way to refer to data you define, defining a structure is the first step (they usually do this for you, gives three useful functions. Note: the contract should have the name of the structure rather than. To define a structure: (define-struct sname (field1 field2)) ;type predicate: basically this is saying that you have created a structure called sname that has properties defined in f1fn. A data definition: is a comment specifying the types of data. ;;a posn in a structure (make-posn xcoord ycoord), where. Structure definitions: show what each item represents (define-struct contact (name email_address)) ;; a contact is a structure (make-contact n e) where. ;; n is a non empty string representing a person"s name and. ;; e is a non empty string representing a person"s email address.