List::peek_front
pub fn peek_front() -> Option<T> Import
Source: use collections::list::{List}; src/collections/list.hy Returns the front value without removing it, or None when the list is empty.
Called on a List value as value.peek_front(…).
Returns#
Option<T>
See also#
List: A singly-linked list with constant-time push and pop at the front.List::new: Creates an empty list.List::size: Returns the number of values.List::is_empty: Returnstruewhen the list has no values.List::push_front: Addsvat the front.List::push_back: Addsvat the back.List::pop_front: Removes and returns the front value, orNonewhen the list is empty.List::pop_back: Removes and returns the back value, orNonewhen the list is empty.