-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I would really love to be able to access an object's names while destructuring. I was hoping that by using names(value)
i could accomplish this due to the assignment method from dotty, but it isn't yet possible.
Here is a repro use case:
library(dotty)
env_vars <- list(
"api_key" = "fbivyb137294hgwv",
"hello" = "world",
"current_user" = "josiah@parry.com"
)
for (i in seq_along(env_vars)) {
.[k = names(value), v] <- env_vars[i]
}
In an ideal world it could look something like
for (.[k, v] in env_vars) {
...
}
Metadata
Metadata
Assignees
Labels
No labels