The combining function is a * 31 + b, so combining with zero doesn't do anything to the hash. This means that the arrays [false, false, false, true], [false, false, true], [false, true] and [true] all have the same hash.
The solution would be not to use zero as the hash of false. Similar for Nothing.
The combining function is
a * 31 + b, so combining with zero doesn't do anything to the hash. This means that the arrays[false, false, false, true],[false, false, true],[false, true]and[true]all have the same hash.The solution would be not to use zero as the hash of false. Similar for Nothing.