lloyAlloy on GitHub
WriteArray
Docs

WriteArray

Updated
WriteArray<T>
local function log_to(sink: write string[])
    sink:push("line")
end

The array a write T[] names: push and the index, nothing that reads. An Array<T> passes where one is asked.

Methods

WriteArray:push

WriteArray:push(...: T): WriteArray<T>

Appends the values in the order given and returns the sink, so calls chain. It is the one method a write T[] has: a sink takes items and never reads them back.

local function log_to(sink: write string[])
    sink:push("line")
end
log_to([ ])