100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
University of British Columbia CPSC 110 LAB 6 $2.99   Add to cart

Exam (elaborations)

University of British Columbia CPSC 110 LAB 6

1 review
 102 views  2 purchases
  • Course
  • Institution

University of British Columbia CPSC 110 LAB 6

Preview 1 out of 3  pages

  • October 15, 2021
  • 3
  • 2021/2022
  • Exam (elaborations)
  • Questions & answers

1  review

review-writer-avatar

By: andychen3 • 2 year ago

avatar-seller
;; 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




[else
(... (fn-for-sentence (first los))
(fn-for-los (rest los)))]))




This study source was downloaded by 100000805705997 from CourseHero.com on 10-14-2021 21:04:54 GMT -05:00


https://www.coursehero.com/file/21394492/LAB-6rkt/

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

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

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

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.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

72042 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$2.99  2x  sold
  • (1)
  Add to cart