lst_reverse(L)

Invert the order of the elements of a list-value.

Syntax

lst_reverse(L)

Input

Argument Type Description
L list-value A list-value

Return Value

Returns a single list-value containing the same values as the list-value passed to the L parameter, but in the opposite order of the original list.

Example

This example demonstrates how to use lst_reverse(L) to reverse the order of elements in a list.

<block name="list_funs" list_a="{lst(1 2 3 4 'a' 'b')}" list_b="{lst(1 'a' 'b' 'c' 'd' 2)}">
  <base table="default.lonely"/>
  <willbe name="intersection" label="Intersection" value="'{inlst(@list_a @list_b)}'"/>
  <willbe name="reverse" label="Reverse" value="'{lst_reverse(inlst(@list_a @list_b))}'"/>
</block>

The output from the lst_reverse(L) function as used above: