by dozzie · 8y ago · 0 comments
Because it would be the dumb way to do it. You have a lookup procedure to extract a value from a hash. A procedure to check if the key is present in the hash will look exactly the same, barring the value being returned.
Libraries usually work the same way as you would write yourself if you were trained in the task, so it's easy to guess.
I'll quote part of it, regarding your "so it's easy to guess"
"In the face of ambiguity, refuse the temptation to guess."