peek_front: Return the data element at the front of an rdeque

Description Usage Arguments Details Value Examples

Description

Simply returns the data element sitting at the front of the deque, leaving the deque alone.

Usage

1

Arguments

x

rdeque to look at.

...

additional arguments to be passed to or from methods (ignored).

Details

Runs in O(1) worst-case time.

Value

data element at the front of the rdeque.

Examples

1
2
3
4
5
6
d <- rdeque()
d <- insert_front(d, "a")
d <- insert_back(d, "b")
e <- peek_front(d)
print(e)
print(d)


Search within the rstackdeque package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.