d = Dictionary$new()
d$add("a", R6::R6Class("A", public = list(id = "a")))
d$add("b", R6::R6Class("B", public = list(id = "c")))
obj1 = dictionary_sugar_inc_get(d, "a_1")
obj1$id
obj2 = dictionary_sugar_inc_get(d, "b_1")
obj2$id
objs = dictionary_sugar_inc_mget(d, c("a_10", "b_2"))
map(objs, "id")
Run the code above in your browser using DataLab