1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
S9fES (reverse! list) ==> list
Reverse LIST in situ, thereby destroying the original list.
Return the reversed list. REVERSE! is much more efficient
than REVERSE, but does not preserve the original list. When
porting S9fES programs, REVERSE! can be replaced by REVERSE.
NOTE: When reversing a list that is bound to a symbol, the
symbol will thereafter no longer be bound to the list. Hence
the expression
(set! x (reverse! x))
should be used to reverse the list bound to X.
(reverse! (list 1 2 3 4 5)) ==> (5 4 3 2 1)
|