Usage
reverse l
reverse! l
Signature
reverse: % %
Parameter | Type | Description |
---|---|---|
l | % | a list |
Returns
reverse(l) returns a copy of with the elements in reverse order, while reverse!(l) reverses without copying it.
Remarks
reverse! does not make a copy of , which is therefore modified after the call. It is unsafe to use the variable after the call, unless it has been assigned to the result of the call, as in l := reverse! l.