# 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

  • List

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

  • Sorted
  • SortedBy

# API Documentation

# Constructors

# List

Signature cp.rx.go.List(values) -> List
Type Constructor
Description Creates 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>
Examples None
Source src/extensions/cp/rx/go/List.lua line 26

# Methods

# Sorted

Signature cp.rx.go.List:Sorted() -> List.Sorted
Type Method
Description Indicates 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>
Examples None
Source src/extensions/cp/rx/go/List.lua line 74

# SortedBy

Signature cp.rx.go.List:SortedBy(...) -> List.SortedBy
Type Method
Description Indicates 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>
Examples None
Source src/extensions/cp/rx/go/List.lua line 103