3 ms·
Nice! I have used Maps often for storing arbitrary key-value pairs, but until 5 minutes ago I didn't know you could use object references as keys. So this was a
by globalise83 3y ago
Nice! I have used Maps often for storing arbitrary key-value pairs, but until 5 minutes ago I didn't know you could use object references as keys. So this was a very good use of 5 mins.
- beebeepka 3y agoSame applies to Set, too. You can store an object, or instance, then use "has" to check for it.