Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Pronouns" for swallowing unneeded arguments #18

Closed
hadley opened this issue Jul 26, 2017 · 1 comment
Closed

"Pronouns" for swallowing unneeded arguments #18

hadley opened this issue Jul 26, 2017 · 1 comment

Comments

@hadley
Copy link
Member

hadley commented Jul 26, 2017

Maybe something like this:

{x : ... : y } %<-% list(1, 2, 3, 4, 5)
{x : . : y : . : z} %<-% list(1, 2, 3, 4, 5)
@nteetor
Copy link
Member

nteetor commented Jul 26, 2017

The latter syntax is supported.

{x : . : y : . : z} %<-% list(1, 2, 3, 4, 5)

In this case, x, y, and z are assigned 1, 3, and 5, respectively.

Regarding the former syntax, we currently recommend using .... to swallow unneeded arguments. In this case, . is assigned the grouped arguments, however this could be changed. What is the case against assigning grouped values and then ignoring the assigned variable?

@nteetor nteetor closed this as completed Jul 26, 2017
@nteetor nteetor reopened this Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants