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_safe(d, "a_1")
obj1$id
obj2 = dictionary_sugar_inc_get_safe(d, "b_1")
obj2$id
objs = dictionary_sugar_inc_mget_safe(d, c("a_10", "b_2"))
map(objs, "id")
Run the code above in your browser using DataLab