ENGINE 2 · A LIST

One-Dimensional Collection Engine

Apply one element template to every object in a collection and return a list of resolved element trees.

Responsibility

The one-dimensional engine maps a source array. For each source item, it applies the same element template through the primitive engine and returns the resulting array of element trees.

Input → transformation → output

Array of data objects+One template→Array of element trees
fromCollection(items, optionTemplate)
  = items.map(item => applyTemplate(item, optionTemplate))

This shape suits sibling elements such as <col>, <th>, and <option>. The element type comes from the template; the collection engine supplies repetition.

Place in the family

Use this engine when the output is a flat list. It does not decide how columns intersect with row data. For a row-and-cell grid, the two-dimensional engine owns that responsibility.

Return to the orchestrator story