Description Usage Arguments Details Value References See Also Examples
Simply returns a version of the given rdeque without the back element The original rdeque is left alone.
1 | without_back(d, ...)
|
d |
rdeque to remove elements from. |
... |
additional arguments to be passed to or from methods (ignored). |
Runs in O(1)-amortized time if the rdeque is used non-persistently (see documentation
of rdeque
for details). If the given rdeque is empty, an error will be generated.
version of the rdeque with the back element removed.
Okasaki, Chris. Purely Functional Data Structures. Cambridge University Press, 1999.
insert_back
for inserting elements.
1 2 3 4 5 6 7 8 9 10 11 12 | d <- rdeque()
d <- insert_front(d, "a")
d <- insert_front(d, "b")
d <- insert_front(d, "c")
d2 <- without_back(d)
print(d2)
d3 <- without_back(d)
print(d3)
print(d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.