Textbook Notes (369,082)
Canada (162,376)
CS 135 (5)

Module 4 - Structures.docx

1 Page

Computer Science
Course Code
CS 135
Sandy Graham

This preview shows half of the first page. Sign up to view the full page of the document.
Compound Data - Structures bundle several values into one. - There exists a predefined structure called “posn” Posn Structures - make-posn: Num Num  Posn - posn-x: Posn  Num - posn-y: Posn  Num - Generally used for positions. - (make-posn 8 1) is considered to be a value and will not be simplified by the stepper. Defining Structures and Data Definitions - The define-struct function requires a structure name and a list of field names. (define-struct mp3 (title artist)) - A structure definition should be followed by a data definition which defines the parameters of a structure. ;; An mp3 = (make-mp3 String String) - Doing this creates a few functions for the user: Constructor: make-mp3 Selector: mp3-title
More Less
Unlock Document

Only half of the first page are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.