Any ideas how to go about this? I am trying to not create any new nodes.
True, but not necessary useful (if it is homework).
khedron
2009-10-02 21:33:45
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
2009-10-02 21:56:14
+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
2009-10-02 21:37:38