You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first and last are currently defined for Lists only.
Last is going to be annoying/non-performant on Map and Set.
We will probably want to cover the common case by simply caching the most recently added item. last will be slow then only when that item has been removed. It also might just not be worth it to implement. The code to keep track of when to invalidate the saved last item would be rather nasty.
The text was updated successfully, but these errors were encountered:
More and more I'm thinking that for now we just exclude all the last* methods. It's the most honest with regards to what's happening under the hood, and that energy can go towards fixing the problem, which would hopefully happen as a result of the advancement of some version of a proposal for reverse iterators.
first
andlast
are currently defined for Lists only.Last is going to be annoying/non-performant on Map and Set.
We will probably want to cover the common case by simply caching the most recently added item.
last
will be slow then only when that item has been removed. It also might just not be worth it to implement. The code to keep track of when to invalidate the saved last item would be rather nasty.The text was updated successfully, but these errors were encountered: