discussed how to generate the stream of all Pythagorean triples, with no upper bound on the size of the integers to be searched. Explain why simply replacing
in the procedure in exercise
is not an adequate way to generate arbitrary Pythagorean triples. Write a procedure that actually will accomplish this. (That is, write a procedure for which repeatedly typing
would in principle eventually generate all Pythagorean triples.)
There are no comments yet.
You must log in to post a comment.Login