Blame


1 12687dd9 2023-08-04 jrmu ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 12687dd9 2023-08-04 jrmu ;; about the language level of this file in a form that our tools can easily process.
3 12687dd9 2023-08-04 jrmu #reader(lib "htdp-advanced-reader.ss" "lang")((modname |40.1|) (read-case-sensitive #t) (teachpacks ((lib "guess-gui.ss" "teachpack" "htdp") (lib "guess.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp") (lib "draw.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ((lib "guess-gui.ss" "teachpack" "htdp") (lib "guess.ss" "teachpack" "htdp") (lib "gui.ss" "teachpack" "htdp") (lib "draw.ss" "teachpack" "htdp")))))
4 12687dd9 2023-08-04 jrmu Exercise 40.1.3. Show how to implement the following structure definitions as functions:
5 12687dd9 2023-08-04 jrmu
6 12687dd9 2023-08-04 jrmu 1.
7 12687dd9 2023-08-04 jrmu
8 12687dd9 2023-08-04 jrmu (define-struct movie (title producer))
9 12687dd9 2023-08-04 jrmu 2.
10 12687dd9 2023-08-04 jrmu
11 12687dd9 2023-08-04 jrmu (define-struct boyfriend (name hair eyes phone))
12 12687dd9 2023-08-04 jrmu 3.
13 12687dd9 2023-08-04 jrmu
14 12687dd9 2023-08-04 jrmu (define-struct cheerleader (name number))
15 12687dd9 2023-08-04 jrmu 4.
16 12687dd9 2023-08-04 jrmu
17 12687dd9 2023-08-04 jrmu (define-struct CD (artist title price))
18 12687dd9 2023-08-04 jrmu 5.
19 12687dd9 2023-08-04 jrmu
20 12687dd9 2023-08-04 jrmu (define-struct sweater (material size producer))
21 12687dd9 2023-08-04 jrmu
22 12687dd9 2023-08-04 jrmu Pick one and demonstrate that the expected laws hold. Solution