Atribuindo um valor a um item da lista usando `assign ()`

Um pouco de contexto primeiro ...

Eu escrevi uma função infix que substitui essencialmente o idioma

x[[length(x) +1]] <- y

..ou simplesmentex <- append(x, y) para vetores.

Aqui está

`%+=%` <- function(x, y) {
  xcall <- substitute(x)
  xobjname <- setdiff(all.names(xcall), c("[[", "[", ":", "$"))
  # if the object doesn't exist, create it
  if (!exists(xobjname, parent.frame(), mode = "list") &&
      !exists(xobjname, parent.frame(), mode = "numeric") &&
      !exists(xobjname, parent.frame(), mode = "character")) {
    xobj <- subset(y, FALSE)
  } else {
    xobj <- eval(xcall, envir = parent.frame())
  }

  if (is.atomic(xobj)) {
    if (!is.atomic(y)) {
      stop('Cannot append object of mode ', dQuote(mode(y)), 
           ' to atomic structure ', xobjname)
    }
    assign(xobjname, append(xobj, y), envir = parent.frame())
    return(invisible())
  }

  if (is.list(xobj)) {
    if (is.atomic(y)) {
      xobj[[length(xobj) + 1]] <- y
    } else {
      for (i in seq_along(y)) {
        xobj[[length(xobj) + 1]] <- y[[i]]
        names(xobj)[length(xobj)] <- names(y[i])
      }
    }
    assign(xobjname, xobj, envir = parent.frame())
    return(invisible())
  }

  stop("Can't append to an object of mode ", 
       mode(eval(xcall, envir = parent.frame())))
}

Funciona como pretendido com vetores ou listas, mas o limite em sua forma atual é que não posso acrescentar um valor a um item dentro de uma lista, por exemplo

a <- list(a = 1, b = 2)
a$b %+=% 3

Até agora não encontrei como fazê-lo. Eu tentei algo como o seguinte, mas não tem efeito:

assign("b", append(a$b, 3), envir = as.environment(a))

Alguma ideia

questionAnswers(1)

yourAnswerToTheQuestion