s <- cpp_multiset(c(2, 2.1, 3, 3, 4.3, 6))
s
# 2 2.1 3 3 4.3 6
erase(s, c(2, 3))
s
# 2.1 4.3 6
m <- cpp_unordered_multimap(c(2:3, 3L), c("hello", "there", "world"))
m
# [3,"world"] [3,"there"] [2,"hello"]
erase(m, 2L)
m
# [3,"world"] [3,"there"]
d <- cpp_deque(4:9)
d
# 4 5 6 7 8 9
erase(d, from = 2, to = 3)
d
# 4 7 8 9
Run the code above in your browser using DataLab