Description Usage Arguments Details Value Examples
Simply returns the data element sitting at the front of the deque, leaving the deque alone.
1 | peek_front(x, ...)
|
x |
rdeque to look at. |
... |
additional arguments to be passed to or from methods (ignored). |
Runs in O(1) worst-case time.
data element at the front of the rdeque.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.