Modifying functions in the typechecker?