|
You should print out your solutions to this assignment, and either turn them in at lecture, or leave them in the TA's mailbox at Sudikoff by class time on Fri. Oct. 9, 2009.
Please also e-mail an electronic version of your code to cs8hw@cs.dartmouth.edu, with the subject "CS 8 Short Assignment 5". Please attach your code as one or more enclosures to the message, and do not include it directly in the body of the e-mail message.
You must work alone on this short assignment.
Solve Exercises 9.4 and 9.5 on p. 108 of SOE by writing recursive functions. (Call them applyEachR and applyAllR.) Give the principal types of the functions.
Solve Exercise 9.5 on p. 108 of SOE by writing a higher-order function involving the apply operator $.
Extra Credit - Solve Exercise 9.4 on p. 108 of SOE by writing a higher-order function involving $ and other functions that we have seen.
Solve 9.10 and 9.11 on p. 113 of SOE.
Solve Exercise 9.3. Justify your answer.