proc (f : ?) proc (x : ?) -((f 3), (f x))
^ ^
[t_f = int → t_{(f 3)}] → [t_f = int → int]
[type_{(f 3)} = int] [type_{(f 3)} = int]
(define type-of
(lambda (exp tenv subst)
(cases expression exp
(diff-exp (exp1 exp2)
(cases answer (type-of exp1 tenv subst)
(an-answer (type1 subst1)
☞ (let ((subst1 (unifier type1 (int-type) subst1 exp1)))
(cases answer (type-of exp2 tenv subst1)
(an-answer (type2 subst2)
(let ((subst2
(unifier type2 (int-type) subst2 exp2)))
(an-answer (int-type) subst2))))))))
...)))