List - FireDragon91245/Lua-Linq GitHub Wiki
Creates or clones a list. A list keeps order, supports direct item access, and inherits the full enumerable pipeline API.
linq.list(): list<any>
linq.list<T>(...: T): list<T>
linq.list<T>(list: list<T>): list<T>
linq.list<T>(enumerable: enumerable<T>): list<T>
linq.list<T>(iter: iter<T>): list<T>
linq.list(table: table): list<any>list inherits all enumerable methods such as distinct, where, select, collect, any, max, min, fork, spread, first, last, iter, and tolist. The pages in this section only cover list-specific behavior.
-
list:enumerate()wraps the list as an enumerable. -
list:copy()clones the list. -
list:add(item)appends an item in-place. -
list:add_transform(item)appends and returns the same list. -
list:iter()returns a direct iterator.
local values = linq.list(4, 8, 15, 16, 23, 42)local from_enum = linq.list(linq.list(1, 2, 3):where("n => n >= 2"))