You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
289 B
28 lines
289 B
2 years ago
|
|
||
|
Exercise 2.40: Define a procedure
|
||
|
unique-pairs that, given an integer
|
||
|
n
|
||
|
, generates the sequence of
|
||
|
pairs
|
||
|
|
||
|
(
|
||
|
i
|
||
|
,
|
||
|
j
|
||
|
)
|
||
|
|
||
|
with
|
||
|
|
||
|
1
|
||
|
≤
|
||
|
j
|
||
|
|
||
|
<
|
||
|
|
||
|
i
|
||
|
≤
|
||
|
n
|
||
|
|
||
|
. Use unique-pairs
|
||
|
to simplify the definition of prime-sum-pairs given above.
|