Blob


1 ;; The first three lines of this file were inserted by DrScheme. They record metadata
2 ;; about the language level of this file in a form that our tools can easily process.
3 #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 ;(define-struct file (name size content))
6 ;A file is a structure
7 ;(make-file name size content) where name is a symbol, size is a number, and content is a Scheme datum.
9 ;A list-of-files is either
10 ;1. empty or
11 ;2. (cons f lof) where f is a file and lof is a list-of-files.
13 ;(define-struct dir (name dirs files))
15 ;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 ;
17 ;A list-of-dirs is either
18 ;1. empty or
19 ;2. (cons d lod) where d is a dir and lod is a list-of-dirs.
21 (define hang (make-file 'hang 8 empty))
22 (define draw-1 (make-file 'draw 2 empty))
23 (define read!-1 (make-file 'read! 19 empty))
24 (define part1 (make-file 'part1 99 empty))
25 (define part2 (make-file 'part2 52 empty))
26 (define part3 (make-file 'part3 17 empty))
27 (define read!-2 (make-file 'read! 10 empty))
28 (define Code (make-dir 'Code empty (list hang draw-1)))
29 (define Docs (make-dir 'Docs empty (list read!-1)))
30 (define Libs (make-dir 'Libs (list Code Docs) empty))
31 (define Text (make-dir 'Text empty (list part1 part2 part3)))
32 (define TS (make-dir 'TS (list Text) (list read!-2)))