Add methods to code_typed to handle a Function or Method.