Programming Languages (CS 329) Homework 4 Computer Science and Engineering Out: 2000-11-18 Indian Institute of Technology Bombay

1. Reconstruct the most general type for the following expression:

       (lambda (g f) (lambda (x) (g (f x)) ) )

2. Can the type of the following expression be reconstructed?

       (lambda (g)
         (let (( s (lambda (x) (g (x x))) ))
           (s s) ) )

If not describe the reconstruction process in detail until it fails.