s <- cpp_multiset(c(6:9, 6L))
s
# 6 6 7 8 9
insert(s, 4:7)
s
# 4 5 6 6 6 7 7 8 9
print(s, from = 6)
# 6 6 6 7 7 8 9
s <- cpp_multiset(c("world", "hello", "world", "there"))
s
# "hello" "there" "world" "world"
erase(s, "world")
s
# "hello" "there"
Run the code above in your browser using DataLab