Ellipsis collection into a variable
Open
meta-proposal
theme-internals
type-enhancement
- Dominant language
- Rust
- Stars
- 145
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
In R, ellipsis are often collected into a list of values using `function(...) { list(...) }`, but if we are to add #47, then we don't really have a good way of collecting "the rest". Instead, we should have some way of collecting ellipsis contents into a variable.
```r
f <- function(a, b, ..rest) {
}
```
This would assign a new variable `rest` which contains the contents of `list(...)`.
Together with #47, this would mean that we could also do something like:
```r
list(head, ..tail) <- list(1, 2, 3, 4, 5, 6, 7)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.