Method in collections::list · List coil-stdlib

List::pop_back

pub fn pop_back() -> Option<T>
Import
use collections::list::{List};
Source: src/collections/list.hy

Removes and returns the back value, or None when the list is empty.

Walks the list, so it takes time proportional to its length.

Called on a List value as value.pop_back(…).

Returns#

Option<T>

Contracts#

Checked according to --contracts (see Contracts).

ensures self.len == old(self.len) - 1 || (old(self.len) == 0 && self.len == 0)

See also#

↑ ↓ navigate ↵ open