-
Notifications
You must be signed in to change notification settings - Fork 46
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
more powerful array splicing: #112
Comments
I would've expected this to just set those elements to -2, not actually remove them. |
@CryZe I would've expected this to set those elements to -2 if the -2 wasn't in an array:
|
There's a difference between:
and
that way both @nmn and @CryZe would be happy. @alongubkin I'm sorry, I don't feel your way in there. |
Well, my proposal was straight from Swift. To be fair, the existing range splicing looked to be straight out of swift, so it felt completely obvious to me. In swift:
Also, you can shove in a bigger array instead:
In Swift: This whole thing feels natural to me and kind of similar to spread operators in ES6 Arrays:
|
Spider already supports:
This should work even if the number of elements on the right don't watch. For example:
The text was updated successfully, but these errors were encountered: