Home / Docs / Standard library / Built-in methods

pop_back

Release v0.4.0Edition 0.5 preview

A built-in method, resolved by the type of its receiver (spec/14 §2). Edition 0.5 preview.

una
edit q.pop_back() -> Option[T]
  where q: Queue[T]

Updates a Queue in place, written let x = edit q.pop_back(): it removes the back and gives it as Some, or gives None when the queue is empty, in O(1) amortized time (spec/28 §5).

Specification

Generated from una v0.4.0 (docs/std/builtins.json, which is not part of the specification): built-in methods have no declaration, so una writes these signature lines and tests each against its checker. The specification governs: spec/14 §2.