Skip to main content

Module accumulator

Module accumulator 

Source
Expand description

ListAccumulator — unknown-length list construction with bounded stack usage.

Unlike ListBuilder which requires knowing the size at construction, ListAccumulator supports dynamic growth via push. It uses ReprotectSlot internally to maintain O(1) protect stack usage.

Structs§

ListAccumulator
Accumulator for building lists when the length is unknown upfront.

Functions§

collect_list
Collect an iterator into an R list with bounded protect stack usage.