a4q4 - ; The first three lines of this file were inserted...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
;; The first three lines of this file were inserted by DrScheme. They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname a4q4) (read-case- sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) ;;CS 116 Assignment 4 Question 4 ;;r46wang 20319247 (define-struct movie-info (title genre rating)) ;;pre-defined movie-infos for easier testing: (define d1 (make-movie-info "a" 'drama 10)) (define d2 (make-movie-info "b" 'drama 8)) (define d3 (make-movie-info "c" 'drama 6)) (define d4 (make-movie-info "d" 'drama 4)) (define d5 (make-movie-info "e" 'drama 2)) (define n1 (make-movie-info "z" 'fantasy 9)) (define n2 (make-movie-info "y" 'action 7)) (define n3 (make-movie-info "x" 'comedy 5)) (define n4 (make-movie-info "w" 'fantasy 3)) (define n5 (make-movie-info "v" 'action 1)) ;;drama-bias?: (listof movie-info) -> boolean ;;produces true if the average rating of drama is 25% higher than the average
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/21/2010 for the course CS 116 taught by Professor T.vasiga during the Fall '09 term at Waterloo.

Page1 / 2

a4q4 - ; The first three lines of this file were inserted...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online