/* list and stream comprehension example (see also Abelson/Sussman: Structure and Interpretation of Computer Programs, MIT Press, 1985) 05-04-1993 AG */ include print; /* prime_sum_pairs N: return the list of all (I,J,I+J) s.t. 1<=J1) and then prime_test N 2; prime_test N M = true if M*M>N; = false if N mod M = 0; = prime_test N (M+1) otherwise; /* all_prime_sum_pairs: generate the stream of all (I,J,I+J) s.t. 1<=J