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

Enumerable:concat

Concatenates the current Enumerable with a second iterable.

Syntax

combined = source:concat(second)

Parameters

Parameter Type Description
second iterable Values to enumerate after the source ends.

Returns

A deferred Enumerable that yields the source values followed by the values from second.

Remarks

The second argument may be a Lua table or another supported iterable. Source ordering is preserved within each input.

Example

local combined = LuaQ.from({
    { name = "Ada", role = "mage" },
    { name = "Bryn", role = "ranger" },
})
    :concat({
        { name = "Cato", role = "mage" },
    })
    :toTable()
-- The second party list follows the first

See also

Union · Zip · Functions

Clone this wiki locally