ludic/packages/ludic.base/kept.ludic
2026-09-28 16:01:28 +03:00

6 lines
373 B
Text

# ludic.base/kept.ludic - the one push the frame is allowed: into a list its owner keeps and clears,
# which grows to the most it has ever held and stays there (a queue's halves, a query's out list)
export function kept_push<T>(xs: []T, v: T) -> void {
@alloc_ok("a kept list: it grows to the most it has held once, is cleared and reused, never dropped")
push(xs, v)
}