REVERSE


lists strings binary
Since v1.0.0
Available on all platforms
See also

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.

Signature

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