sicp/2_22.txt

9 lines
332 B
Plaintext

The list is in the reverse order because each call to cons puts the next
item in front of the previous one. We are iterating through the input
list from left to right but are adding to the result from right to left.
The second solution doesn't work because cons takes a single value as
its first value and a list as its second.