Hurts?

hurts?: boolean(hit) boolean(hard) -> boolean

It only hurts if you get hit and the hit was hard.


Care

care: boolean(injured) number(blood) -> string


Red-Blue

  1. (red-blue-1 n) gives “red” if the number is less than 30, otherwise “blue”.
  2. (red-blue-2 xxx) gives “red” 30% of the time and “blue” 70% of the time.

Mystery Function

(define (scrunch x)
   (cond [(< x 10)       0]
         [else     (/ x 2)]))

Give 3 examples what it does.


Scrunch Sum

(scrunch-three 5 12 40) => 26

Word Points

(sum-points "saw" "it" "workhorse" "betadyne") => 48

Early Wake-Up

Count the number of people who wake up before cutoff-time.

(early-wake-up cutoff-time 
               person-1-time
               person-2-time
               person-3-time)