Optionalbudget: BudgetReturns the sequence that has item behind the items of sequence.
Returns a sequence that is not empty without its first item.
Returns the first item of a sequence that is not empty.
Returns the number of items of a sequence.
Yields the items of a sequence from its front to its back.
Holds immutable sequences of 32-bit integers that grow at the back and shrink at the front. The pool gives equal sequences the same id, so two sequences are equal when their ids are equal. A queue is such a sequence.
A sequence is kept as a list from its front to its back. So
shift,firstandlengthtake constant time, andpushtakes time linear in the length of the sequence. A pool with a budget charges oneResource.Cellsfor each new list that apushbuilds, which is at most the length of its result.