Try to access first or last element and return some default value if not found.
In contrast to [at2()]
, this function provides a less stricter element
access, that is, it remains valid even if peeked elements don't exist.
Usage
peekleft(x, default = NULL)
peek(x, default = NULL)
# S3 method for class 'Deque'
peek(x, default = NULL)
# S3 method for class 'Deque'
peekleft(x, default = NULL)
See also
at2()
for strict element extraction