3 ms·
Like a stream?
by stirfish 5y ago
Like a stream?
- Case81 5y agothink Set in Java does this EDIT: Other than the obvious
- BulgarianIdiot 5y agoYes, like a stream, or an iterator. Where you fetch also a reverse iterator if you wish, filter by some predicate etc. A lot of overlap with both relational algebra/sql and with functional programming filter/map/reduce, I guess. Indexes seem convenient, but they're a hack in most cases. Consider what happens when you sort your array, or delete or insert an item in the middle, or start. Now all your indexes have changed. React had this issue, and this is why they had to add stable "key" to collections so that when you mutate a sequence of <li/> items for example, it doesn't get confused which is which.