@lang:reverse
Reverse the order of an array's elements.
Returns: array
Syntax
Section titled “Syntax”@lang:reverse(arr)Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
arr | array | Source array |
See Also
Section titled “See Also”- @sort — sort by comparator
On-chain face (@reverse!)
Section titled “On-chain face (@reverse!)”Reverse the word payload of the array return of a call on-chain through
reverseWords. The result is a words payload (bytes), composable with
the other array faces.
Examples
Section titled “Examples”load lang
set $safe 0x44fA8E6f47987339850636F88629646662444217
assert @at!($safe::{getOwners()(address[])} -1) == @meSee Also
Section titled “See Also”assert,@sort!,@map!