Final Exam, 22 March 2002
lmap
to a suitable
f
to get a function that adds one to each element of a list
of integers; now do the same for subtracting one.
lmap
to a suitable
f
to get a function evens
that deletes all odd
numbers from a list of integers.
odds
that deletes all even numbers from a list of
integers.
evens
with odds
?
Why? What is the composition of evens
with itself? Why?
m([1,2], [2,3], A)
and
briefly explain what it means. m
in problem 6 (regarding the third argument as a function of
the other two), and sketch how you could prove that this code is correct.