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-intermediate-reader.ss" "lang")((modname 16.3.2) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "dir.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp") (lib "dir.ss" "teachpack" "htdp")))))
4 12687dd9 2023-08-04 jrmu ;(define-struct file (name size content))
5 12687dd9 2023-08-04 jrmu
6 12687dd9 2023-08-04 jrmu ;A file is a structure
7 12687dd9 2023-08-04 jrmu ;(make-file name size content) where name is a symbol, size is a number, and content is a Scheme datum.
8 12687dd9 2023-08-04 jrmu
9 12687dd9 2023-08-04 jrmu ;A list-of-files is either
10 12687dd9 2023-08-04 jrmu ;1. empty or
11 12687dd9 2023-08-04 jrmu ;2. (cons f lof) where f is a file and lof is a list-of-files.
12 12687dd9 2023-08-04 jrmu
13 12687dd9 2023-08-04 jrmu ;(define-struct dir (name dirs files))
14 12687dd9 2023-08-04 jrmu
15 12687dd9 2023-08-04 jrmu ;A directory (dir) is a structure (make-dir n d f) where n is a symbol, d is a list-of-dirs, and f is a list-of-files.
16 12687dd9 2023-08-04 jrmu ;
17 12687dd9 2023-08-04 jrmu ;A list-of-dirs is either
18 12687dd9 2023-08-04 jrmu ;1. empty or
19 12687dd9 2023-08-04 jrmu ;2. (cons d lod) where d is a dir and lod is a list-of-dirs.
20 12687dd9 2023-08-04 jrmu
21 12687dd9 2023-08-04 jrmu (define hang (make-file 'hang 8 empty))
22 12687dd9 2023-08-04 jrmu (define draw-1 (make-file 'draw 2 empty))
23 12687dd9 2023-08-04 jrmu (define read!-1 (make-file 'read! 19 empty))
24 12687dd9 2023-08-04 jrmu (define part1 (make-file 'part1 99 empty))
25 12687dd9 2023-08-04 jrmu (define part2 (make-file 'part2 52 empty))
26 12687dd9 2023-08-04 jrmu (define part3 (make-file 'part3 17 empty))
27 12687dd9 2023-08-04 jrmu (define read!-2 (make-file 'read! 10 empty))
28 12687dd9 2023-08-04 jrmu (define Code (make-dir 'Code empty (list hang draw-1)))
29 12687dd9 2023-08-04 jrmu (define Docs (make-dir 'Docs empty (list read!-1)))
30 12687dd9 2023-08-04 jrmu (define Libs (make-dir 'Libs (list Code Docs) empty))
31 12687dd9 2023-08-04 jrmu (define Text (make-dir 'Text empty (list part1 part2 part3)))
32 12687dd9 2023-08-04 jrmu (define TS (make-dir 'TS (list Text) (list read!-2)))