reverse
for filters
Reverses the input list or table.
Signature
> reverse {flags}
Input/output types:
input | output |
---|---|
list<any> | list<any> |
Examples
Reverse a list
> [0,1,2,3] | reverse
╭───┬───╮
│ 0 │ 3 │
│ 1 │ 2 │
│ 2 │ 1 │
│ 3 │ 0 │
╰───┴───╯
Reverse a table
> [{a: 1} {a: 2}] | reverse
╭───┬───╮
│ # │ a │
├───┼───┤
│ 0 │ 2 │
│ 1 │ 1 │
╰───┴───╯