3 (define (stream-triplicates s)
4 (if (= (stream-car s) (stream-car (stream-cdr s)) (stream-car (stream-cdr (stream-cdr s))))
5 (cons-stream (stream-car s)
6 (stream-triplicates (stream-cdr (stream-cdr s))))
7 (stream-triplicates (stream-cdr s))))
9 (define (square-sum i j)
12 (display-stream (stream-triplicates (stream-map (lambda (p)
13 (square-sum (car p) (car (cdr p))))
14 (weighted-pairs integers integers square-sum))))