Skip to content

Ellipsis collection into a variable #48

@dgkf

Description

@dgkf

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.

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:

list(head, ..tail) <- list(1, 2, 3, 4, 5, 6, 7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions