REVERSE
lists
strings
binary
Reverses the order of the elements of the list or the string.
The REVERSE
function inverts the order of the elements of the list or the string on the top of the stack.
Beware, REVERSE
do not create a new object. Use CLONEREVERSE
if you want to keep input.
Applied on a byte array, REVERSE
reverses the endianness.
REVERSE is available since version 1.0.0.
See also
Signatures
Examples
[ 'eins' 'zwei' 'drei' ] 'mylist' STORE
$mylist REVERSE // Output is the reference to the reversed list
$mylist // Now reversed
'swap tac' 'mystring' STORE
$mystring REVERSE
$mystring // Beware, this is now reversed.
'lamina' 'str2' STORE
$str2 CLONEREVERSE
$str2 // Original string is preserved