Module : lang.table

Version : 0.4.0

Module Overview

This module provides lang library operations on table values defined by the language specification 2020R1.

Functions

add
I

Adds a member val to table t.

filter

Selects the members from a table for which a function returns true.

forEach

Applies a function to each member of a table.

get
I

Returns the member of table t with key k.

hasKey
I

Tests whether t has a member with key k.

iterator
I

Returns an iterator over a table.

keys
I

Returns a list of all the keys of table t.

length
I

Returns number of members of a table.

map

Applies a function each member of a table and returns a table of the result.

nextKey
I

Returns the next available integer key.

put
I

Adds a member val to table t, replacing any member with the same key value.

reduce

Combines the members of a table using a combining function.

remove
I

Removes a member of a table.

removeAll
I

Removes all members of a table.

removeIfHasKey
I

Removes a member of a table with a given key, if the table has member with the key.

toArray
I

Returns a list of all the members of a table.