Skip to content
Dennis Corvers edited this page Oct 23, 2026 · 2 revisions

Enumerable.create

Creates an Enumerable from an iterable recognized by LuaQ.

Syntax

values = LuaQ.create(iterable)

Parameters

Parameter Type Description
iterable table, Enumerable, or supported iterable Source values.

Returns

A new Enumerable wrapping the source.

Remarks

from is a direct alias. LuaQ recognizes its own Enumerable, tables, and objects exposing supported iterator metamethods or iterator tuples. Ordinary array tables use ipairs; dictionary-like tables use pairs.

Example

local playerSource = {
    { name = "Ada", level = 92 },
    { name = "Bryn", level = 78 },
}

local highLevelPlayers = LuaQ.create(playerSource)
    :where(function(player) return player.level >= 90 end)

See also

CreateFrom · Functions

Clone this wiki locally