Due Fri 10/1 11:59pm
1. Add one (non-dependent) contract-out specification for this function and write three calls to sum such that one blames this module, one blames the calling module and one produces a result without any blame.
|(module sum racket|
|(define (sum l)|
|[(empty? (rest l)) (first l)]|
|[else (+ (first l)|
|(sum (rest l)))])))|
|(require (submod "." sum))|
3. The following contract does not capture g’s behavior. Come up with an example call to g that results in a contract violation blaming the following module (which contains g).
|(module g racket|
|[g (-> (-> natural? natural?)|
|(define (g f x)|
|(- (f (f x)))))|
4. Without changing the contract on the x argument or on the result of g (so change only the contract on the f argument), adjust the contract so that g cannot be blamed.
Submit a racket file with your solution via Canvas.