Comment

Comment by orlp

I don't like `shift` as a name because it might give the impression the entire window shifts. Push increases the window size by one and pop decreases the window size by one (evicting the earliest pushed element).

In my mental model `shift` would move the entire window, it would be one push + one pop.

parent orlp 15 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton