2 ms·
Unfortunately, map can (and does) have external effects in most languages, so your code could still be effected by the external order. I’ve actually worked on
by CJefferson 2y ago
Unfortunately, map can (and does) have external effects in most languages, so your code could still be effected by the external order.
I’ve actually worked on some maths code where we wanted to prove algorithms worked correctly in exactly this type of situation, so we wanted to prove our code iterating over a hashed container was order-invariant. You can do it, but involves pulling in theorem provers, and is beyond what most people would probably tolerate.