CS115 Lecture Notes - Lecture 1: Style Guide, Natural Number
elliehaj0807 and 36989 others unlocked
13
CS115 Full Course Notes
Verified Note
13 documents
Document Summary
Due: monday april 6th at 4:00 p. m: read each question carefully. For mutual recursion, you are only required to include one set of examples and tests for all functions in your solution. A local function only requires a contract and a purpose. It may be necessary to use more than one of these functions to complete the solutions. It will not be accepted by course staff as an assignment submission. Coverage: module 9 & 10 (define-struct cat (sleeptime children)) ;; a cat is a (make-cat nat loc) ;; sleeptime represents the cat"s average number of hours of. ;; children is a list of this cat"s children. ;; is empty it means that the cat has no children. ;; (cons cat loc) (define-struct element (name mmass)) ;; an element is a (make-element sym num) ;; mmass > 0 (define-struct compound (name pl)) ;; a compound is a (make-compound sym partlist)