s <- cpp_multiset(4:6)
s
# 4 5 6
insert(s, 6:7)
s
# 4 5 6 6 7
m <- cpp_map(c("hello", "there", "world"), 9:11)
m
# ["hello",9] ["there",10] ["world",11]
insert(m, 12L, "there")
m
# ["hello",9] ["there",10] ["world",11]
Run the code above in your browser using DataLab