Hacker News new | ask | show | jobs
by xigoi 1489 days ago
I'm confused. It's easy to emulate a set using a map, but how do you emulate a map using a set?
1 comments

You model the key->value relationship, call it an association, and place associations in the set, where the equality/hash functions are performed on the association key.