tags:

views:

66

answers:

2

Any ideas how to go about this? I am trying to not create any new nodes.

+3  A: 

Call nreverse.

Pete Kirkham
True, but not necessary useful (if it is homework).
khedron
If it's not homework, that's the right answer (just make sure to assign the result to something, like (setf foo-prime (nreverse foo))). If it's homework, I'd rather the questioner said so.
David Thornley
+1  A: 

Draw a standard cons-cell diagram of what a list with 5 elements or so looks like. That should give you a big clue right there.

Don't forget to keep a reference to the last cell in the list, which will be your new list head when done.

khedron