You can do a handy struct wrapper over a private Nonzero that xors the given value with the prohibited value (max in this case) at the new constructor. And like so for the get method. Xoring is very cheap. That's my favorite way of storing indices/links for nodes, since you can wrap them in Option for free.
o11c|1 year ago
unknown|1 year ago
[deleted]
unknown|1 year ago
[deleted]
jsheard|1 year ago