Please read Chapter 11 in your textbook.
Please do the following problems
[red,green,blue] with new syntax:
fix, NOT
letrec) to implement infinite lists similarly to
tables (see page 137). An infinite list will map a natural
number to a natural number. In particular, we do not need options.
Implement the following functions:
Nat -> Bool) and a list, return a list with all elements that
are true for the predicate, in their original order.
Leave your whole program in list.f in
your AFS volume for Homework #6.
Modify the proofs of type soundness of the simply-typed lambda
calculus with ``unit'' types to add sums (See Figure 11-9).
A skeleton file is available which gives the syntax (slightly modified
from that in the textbook to avoid the keyword case and
reserved operator |). You will need to
define evaluation and type rules. You should follow the book as
closely as possible.