Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Measter
on Feb 22, 2021
|
parent
|
context
|
favorite
| on:
Go is not an easy language
That's not exactly the same. Splice returns an iterator, it doesn't modify the collection in place.
Dr_Emann
on Feb 23, 2021
[–]
Yes it does exactly that. It returns an iterator over the removed items, but when that iterator is dropped, it modifies the collection. See
https://play.rust-lang.org/?version=stable&mode=debug&editio...
Measter
on Feb 24, 2021
|
parent
[–]
Huh... I guess I should read the docs more carefully next time; I clearly misunderstood them.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: