Triples procedure

Write a procedure triples that takes three infinite streams, S , T , and U , and produces the stream of triples (Si, Tj, Uk) such that i ≤ j ≤ k . Use triples to generate the stream of all Pythagorean triples of positive integers, i.e., the triples (i, j, k) such that i ≤ j and i² + j² = k² .


There are no comments yet.

Authentication required

You must log in to post a comment.

Login