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-beginner-reader.ss" "lang")((modname 11.2.4) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "draw.ss" "teachpack" "htdp") (lib "arrow.ss" "teachpack" "htdp")))))
4 12687dd9 2023-08-04 jrmu A deep-list is either
5 12687dd9 2023-08-04 jrmu 1. a symbol or
6 12687dd9 2023-08-04 jrmu 2. (cons dl empty) where dl is a deep-list.
7 12687dd9 2023-08-04 jrmu
8 12687dd9 2023-08-04 jrmu depth : deep-list -> number
9 12687dd9 2023-08-04 jrmu Consumes a deep-list dl and determines how many
10 12687dd9 2023-08-04 jrmu cons were used to construct it.
11 12687dd9 2023-08-04 jrmu
12 12687dd9 2023-08-04 jrmu (define (depth dl)
13 12687dd9 2023-08-04 jrmu (cond
14 12687dd9 2023-08-04 jrmu []
15 12687dd9 2023-08-04 jrmu []))