> (precedes #\a "abracadabra") (#\c #\d #\r)
5.7 Define a function that takes a list of numbers and returns true iff the difference between each sucessive pair of them is 1, using
do
mapc
and return
6.7 Define a function that takes one argument, a number, and returns true
if it is greater than the argument passed to the function the last time it
was called. The function should return nil
the first time it
is called.
6.8 Suppose expensive
is a function of one argument, an
integer between 0 and 100 inclusive, that returns the result of a
time-consuming computation. Define a function frugal
that
returns the same answer, but only calls expensive
when given
an argument it has not seen before.
7.3 Suppose that in some format for text files, comments are indicated by a % character. Everything from this character to the end of the line is ignored. Define a function that takes two filenames, and writes to the second file a copy of the first, minus comments.
7.4 Define a function that takes a two-dimensional array of floats and
displays it in neat columns. Each element should be printed with two
digits after the decimal point, in a field 10 characters wide. (Assume all
will fit.) You will need array-dimensions
.