dgkf / R

An experimental reimagining of R
https://dgkf.github.io/R
GNU General Public License v3.0
136 stars 5 forks source link

Feature: Generalize ellipsis as a `..rest` argument (when `rest-args` enabled) #145

Closed dgkf closed 4 months ago

dgkf commented 4 months ago

Closes #133; Inspired by the discussion in #133

vanilla

f <- fn(...) list(...)
f(1, 2, 3)
# list(1, 2, 3)

f <- fn(...) .
f(1, 2, 3)
# Error: object '.' not found

rest-args

f <- fn(...) list(...)
f(1, 2, 3)
# list(1, 2, 3)

f <- fn(...) .
f(1, 2, 3)
# list(1, 2, 3)

Other enhancements