Supported list types


Number list

This function inverts the order of a given number list.


invertList(numberList) #Output: Number list



Parser expressionDescription


invertList([1, 2, 3])


This example returns:

[3, 2, 1]



Parameters used in this function

ParameterInput (data type)Description
numberList

Any given number list.



This function returns a



Text list

Variant for text lists.


invertList(textList) #Output: Text list



Parser expressionDescription


invertList(["first", "second", "third"])


This example returns:

["third", "second", "first"]



Parameters used in this function

ParameterInput (data type)Description
textList

Any given text list.



This function returns a



Use cases and examples



Parser function cloud
Map(question)
Notes

Workaround

let list = [11,7,3,2,5];
let pos = list.map(e=>list.length-list.indexOf(e)-1);
pos.flatMap(p=> list[p])

The list pos is a inverted list of the indexes of the original list.






Status
Tech review

Style guide




Short description

Inverts the order of a given list.

Output

Available since

Label