;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname |LAB 6|) (read-case-sensitive #t)
(teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(define-struct sentence (name subs))
;; Sentence is (make-sentence String ListOfSentence)
;; interp. a sentence representing a single part of the tree with
;; name the sentence itself
;; subs the list of sub-sentences within the sentence
;; ListOfSentences is one of:
m
;; - empty
er as
;; - (cons Sentence ListOfSentence)
co
;; interp. a list of sentences
eH w
o.
(define joking (make-sentence "joking about jealousy" empty))
rs e
(define you (make-sentence "you really mean it" empty))
ou urc
(define in (make-sentence "in a book to school special about mono" empty))
(define perched (make-sentence "perched on the tip of a sinking boat" empty))
(define freez (make-sentence "freeze time" empty))
o
(define my (make-sentence "my favourite song on repeat" empty))
aC s
(define it (make-sentence "it is your last chance" empty))
vi y re
(define we-are (make-sentence "we are" (list in perched)))
(define like (make-sentence "like" (list it you we-are)))
(define to (make-sentence "to" (list freez my)))
ed d
(define kiss-me (make-sentence "kiss me" (list joking like to)))
ar stu
#;#;
(define (fn-for-sentence s)
is
(... (sentence-name s)
Th
(fn-for-los (sentence-subs s))))
(define (fn-for-los los)
(cond [(empty? los) (...)]
sh
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller solutions. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $2.99. You're not tied to anything after your purchase.