
I also encountered the Anonymous Arithmetic Error while LA'ing.

The reason it happens is that the triples generated from Exercise 1
are incorrect.  The students are actually generating triples with two
of the points identical and somewhere in the code for generating a
transform, a divide by 0 occurs.

With respect to the memory problems, I think that it is largely due to
code written badly. If the code is written in such a way that many
temporary streams are generated while a procedure is invoked, then the
machine is going to run out of memory.

For example in Exercise 2(?) when students were asked to write
make-hypotheses to take the image and model (both lists) as arguments,
and produce the stream of hypotheses, many of them constructed the
stream of triples from the given lists within the looping procedure.
This causes a problem because a stream triple computation is done for
every element of the list - which in turn involves a stream-pairs
computation each time (Pretty expensive both in time and space).

A better way of doing this is to compute the stream triples
only once in a let statement and then write an auxiliary procedure,
internal to make-hypotheses, that takes stream triples as arguments
and handles the iteration (or recursion).

-- Daniel

