; The following should type-check without errors (type-check " let lst = list(0,1,true) in unpack a b c = lst in % Succeeds because c should be bool % and both the then and else statements evaluate % to the type (listof int int). if c then cons(a, cons(car(cdr(lst)), emptylist)) else cons(b, list(a)) ") (type-check " let lst = list(false,10,20) % If first element of x is true, return second element, % else return third element. p = proc ((listof bool int int) x) if car(x) then car(cdr(x)) else car(cdr(cdr(x))) in (p lst) ") (type-check " let lst = emptylist in if null?(lst) then 1 else 2 ")