CSE526: Principles of Programming Languages Scott Stoller hw6: eager functional language version: 9am,12mar2004 due: 18 mar 2004 1. show how to use the evaluation rules in chapter 11 to evaluate the following program (the definition of "search" is copied from [Reynolds, page 234]). letrec search = lambda x. lambda p. lambda f. lambda g. listcase x of (g <>, lambda i. lambda r. if p then f i else search r p f g) in search (0::((1+2)::5)) (lambda j. j=3) (lambda j. j+2) (lambda z. 7) to save writing, introduce some abbreviations, for example, P = (lambda j. j=1) F = (lambda j. j+2) G = (lambda z. 7) to save writing, you only need to show in detail all uses of the evaluation rules for lists (on page 231) and the evaluation rule for recursion (on page 230). evaluation relationships that can be derived without using those rules may be stated without proof.