CPSC 425 Assignment 17
Type Inference
Due Before Class on Monday, April 5th
Read section 7.4 of Essentials of Programming Languages and complete the following exercises:
- Use unification to derive a type for the expression:
proc (f)
let d = proc (x)
proc (z) ((f (x x)) z)
in proc (n) ((f (d d)) n)
- 7.26 (pg. 272)
- example usage : (check "newref(42)") = (refto int)
- example usage : (check "deref(newref(42))") = int
- example usage : (check "setref(newref(42), 43)") = void
Submission: Submit through the course blackboard site.