On this page:
1 Which template to use?
2 Processing two inputs
8.14

Lecture 22: Simultaneous processing🔗

This assignment is due on Tuesday, November 5 at 11:59pm. Submit it using Handin as assignment lecture22.

1 Which template to use?🔗

Exercise 1.
; A Month is one of:
; - "January"
; - "February"
; - "March"
; - "April"
; - "May"
; - "June"
; - "July"
; - "August"
; - "September"
; - "October"
; - "November"
; - "December"
 
; A MonthFormat is one of:
; - "long"
; - "short"
 
; format-month : Month MonthFormat -> String
; abbreviates the given Month to three letters or not
(check-expect (format-month "November" "long") "November")
(check-expect (format-month "November" "short") "Nov")
(define (format-month m f)
  ...)
Should format-month follow the template for processing the Month input m or the MonthFormat input f? Why? Put your answer in a comment, like this:
; Exercise 1
; format-month should follow the template for processing
; the Month input m, because ...
or like this:
; Exercise 1
; format-month should follow the template for processing
; the MonthFormat input f, because ...
Then, design format-month following the template you chose.

2 Processing two inputs🔗

Exercise 2.
; A Move is one of:
; - "split"
; - "steal"
Write the template for a function that processes a Move. Make it look like a function called process-move, and do not put it in a comment.

Come to class!

Optional: Read Chapter 23 of the textbook.