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

Add ++= operator for mutable lists #7346

Closed
webbedspace opened this issue Dec 4, 2022 · 0 comments · Fixed by #7354
Closed

Add ++= operator for mutable lists #7346

webbedspace opened this issue Dec 4, 2022 · 0 comments · Fixed by #7354
Labels
enhancement New feature or request
Milestone

Comments

@webbedspace
Copy link
Contributor

Related problem

Since we have ++ now, this seems like an easy add.

Describe the solution you'd like

Here's how it'd work:

> mut a = [1 2 3]
> $a ++= [4 5 6]
> $a
[1 2 3 4 5 6]

Same type-check caveats as ++ apply here.

Describe alternatives you've considered

No response

Additional context and details

No response

@webbedspace webbedspace added the enhancement New feature or request label Dec 4, 2022
raccmonteiro added a commit to raccmonteiro/nushell that referenced this issue Dec 5, 2022
raccmonteiro added a commit to raccmonteiro/nushell that referenced this issue Dec 7, 2022
raccmonteiro added a commit to raccmonteiro/nushell that referenced this issue Dec 7, 2022
raccmonteiro added a commit to raccmonteiro/nushell that referenced this issue Dec 9, 2022
append_assign tests

test type mismatch
rgwood pushed a commit that referenced this issue Dec 9, 2022
# Description

Closes  #7346



# Tests + Formatting
```
> mut a = [1 2 3]
> $a ++= [4 5 6]
> $a
[1 2 3 4 5 6]
```
@hustcer hustcer added this to the v0.73 milestone Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants