R/generics.R, R/hashmap.R, R/hashset.R
insert.RdThese generics are used for inserting a single key or key/value
pair into an hashset or hashmap, respectively. For vectorized
insertions, see the subsetting_hashtables documentation page.
insert(x, key, ...)
# S3 method for class 'r2r_hashmap'
insert(x, key, value, ...)
# S3 method for class 'r2r_hashset'
insert(x, key, ...)key for the hashset method,
value for the hashmap method.
s <- hashset()
insert(s, "foo")
s[["foo"]]
#> [1] TRUE