Memoization requires that the cache value be the correct answer for that
input. The parameters to the function are still "evaluated" in the sense
that we know that actual value being passed.
Note, your function isn't ACTUALLY returning True and False, it is doing
test executions in its simulation to see if either answer could be
correct. It has sort of gotten around the requirement of a pure function
to always return a single value for a given set of parameter by doing so
ONLY in its INTERNAL simulation of the input.
The key is no actual routine outside of H ever sees that value, at least
until H decides which answer it is going to give and return it.
The "returning" is only an aspect of the simulation that it is
performing, and not observable by the outside world.