#cp.rx.go.List

Extends: Statement

A Statement that will loop through a table as a list from item 1 to the table length.


#Submodules


#API Overview

Constructors - API calls which return an object, typically one that offers API methods

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Constructors

Signaturecp.rx.go.List(values) -> List
TypeConstructor
DescriptionCreates a new List Statement that will loop through the provided table as a list.
Parameters
  • values - a table value, or a function which returns a table.
Returns
  • The Statement which will return the first value when executed.
Notes
  • Example:
  • lua</li><li>List(someTable)</li><li>
ExamplesNone
Sourcesrc/extensions/cp/rx/go/List.lua line 26

#Methods

Signaturecp.rx.go.List:Sorted() -> List.Sorted
TypeMethod
DescriptionIndicates the List should be sorted by its natural order before being sent out individually.
Parameters
  • None
Returns
  • The Sorted Statement.Modifier.
Notes
  • For example:
  • lua</li><li>Sort(9,2,5):Sorted()</li><li>
ExamplesNone
Sourcesrc/extensions/cp/rx/go/List.lua line 74

Signaturecp.rx.go.List:SortedBy(...) -> List.SortedBy
TypeMethod
DescriptionIndicates the List should be sorted by the provided function.
Parameters
  • None
Returns
  • The SortedBy Statement.Modifier.
Notes
  • For example:
  • lua</li><li>Sort(9,2,5):SortedBy(function(a, b) return b < a)</li><li>
ExamplesNone
Sourcesrc/extensions/cp/rx/go/List.lua line 103