Remix.run Logo
shawn_w a day ago

Insertion-ordered hash tables are a thing, though they usually don't allow duplicates any more than other hash table designs.

Ocaml hash tables have the interesting property where each entry is treated like a stack; inserting an existing key pushes the new value and deleting pops. I've always assumed this is for use with lexically scoped symbol tables in the compiler.