export property Pool { items: []T = null } function grow(p: Pool) -> void { if p.items == null { p.items = new []T } } export function pool_add(p: Pool, x: T) -> void { grow(p) push(p.items, x) } export function pool_len(p: Pool) -> int { return len(p.items) }